Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0fede44

Browse filesBrowse files
committed
ENH more robust transformer testing.... don't ask why that came up
1 parent 97717ba commit 0fede44
Copy full SHA for 0fede44

File tree

Expand file treeCollapse file tree

1 file changed

+3
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-5
lines changed

‎sklearn/tests/test_common.py

Copy file name to clipboardExpand all lines: sklearn/tests/test_common.py
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from sklearn.utils import shuffle
2121
from sklearn.preprocessing import Scaler
2222
#from sklearn.cross_validation import train_test_split
23-
from sklearn.datasets import load_iris, load_boston
23+
from sklearn.datasets import load_iris, load_boston, make_blobs
2424
from sklearn.metrics import zero_one_score, adjusted_rand_score
2525
from sklearn.lda import LDA
2626
from sklearn.svm.base import BaseLibSVM
@@ -113,10 +113,8 @@ def test_transformers():
113113
estimators = all_estimators()
114114
transformers = [(name, E) for name, E in estimators if issubclass(E,
115115
TransformerMixin)]
116-
iris = load_iris()
117-
X, y = iris.data, iris.target
118-
X, y = shuffle(X, y, random_state=0)
119-
X, y = X[:10], y[:10]
116+
X, y = make_blobs(n_samples=30, centers=[[0, 0, 0], [1, 1, 1]],
117+
random_state=0, n_features=2, cluster_std=0.1)
120118
n_samples, n_features = X.shape
121119
X = Scaler().fit_transform(X)
122120
X -= X.min()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.