8000 Some fixes due to changes in data format · scikit-learn/scikit-learn@df22dfa · GitHub
[go: up one dir, main page]

Skip to content

Commit df22dfa

Browse files
committed
Some fixes due to changes in data format
1 parent 22e1ab8 commit df22dfa

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

examples/linear_model/plot_sgd_early_stopping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
print(__doc__)
5757

5858

59-
def load_mnist(n_samples=None, class_0=0, class_1=8):
59+
def load_mnist(n_samples=None, class_0='0', class_1='8'):
6060
"""Load MNIST, select two classes, shuffle and return only n_samples."""
6161
mnist = fetch_openml('mnist_784', version=1)
6262

examples/multioutput/plot_classifier_chain_yeast.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@
4747
print(__doc__)
4848

4949
# Load a multi-label dataset
50-
yeast = fetch_openml('yeast', version=2)
51-
X_train, X_test, Y_train, Y_test = train_test_split(yeast.data, yeast.target,
52-
test_size=.2,
50+
yeast = fetch_openml('yeast', version=4)
51+
X = yeast.data
52+
Y = yeast.target == 'TRUE'
53+
X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=.2,
5354
random_state=0)
5455

5556
# Fit an independent logistic regression model for each class using the

0 commit comments

Comments
 (0)
0