Skip to content

Commit

Permalink
fix don't use weird estimators which are not filtered out in all_esti…
Browse files Browse the repository at this point in the history
…mators until 0.15.2
  • Loading branch information
amueller committed Dec 18, 2014
1 parent a2daac8 commit 323485e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions vistrails/packages/sklearn/init.py
Expand Up @@ -19,6 +19,13 @@ def try_convert(input_string):
except ValueError:
return input_string

# backport of odd estimators that we don't want to include
dont_test = ['SparseCoder', 'EllipticEnvelope', 'DictVectorizer',
'LabelBinarizer', 'LabelEncoder', 'MultiLabelBinarizer',
'TfidfTransformer', 'IsotonicRegression', 'OneHotEncoder',
'RandomTreesEmbedding', 'FeatureHasher', 'DummyClassifier',
'DummyRegressor', 'TruncatedSVD', 'PolynomialFeatures']


###############################################################################
# Example datasets
Expand Down Expand Up @@ -307,6 +314,8 @@ def discover_unsupervised_transformers():
transformers = all_estimators(type_filter="transformer")
classes = []
for name, Est in transformers:
if name in dont_test:
continue
module = Est.__module__.split(".")[1]
if module not in ['decomposition', 'kernel_approximation', 'manifold',
'neural_network', 'preprocessing', 'random_projection']:
Expand All @@ -320,6 +329,8 @@ def discover_feature_selection():
transformers = all_estimators(type_filter="transformer")
classes = []
for name, Est in transformers:
if name in dont_test:
continue
module = Est.__module__.split(".")[1]
if module != "feature_selection" or name == "GenericUnivariateSelect":
continue
Expand Down

0 comments on commit 323485e

Please sign in to comment.