Skip to content

[MRG+2] default gamma='auto' in SVC #10331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 44 commits into from
Mar 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0551ddd
gamma=auto in SVC #8361
neokt Mar 4, 2017
3a4a275
Merge branch 'master' into svc_gamma
gxyd Dec 15, 2017
913ac83
fix docs and add gamma='auto_deprecated' as default
gxyd Dec 16, 2017
730776e
fix
gxyd Dec 16, 2017
814c4e6
revert change to change self.gamma
gxyd Dec 16, 2017
da2bcc5
fix docs
gxyd Dec 18, 2017
61bd7c1
use X.multiply(X) for csr_matrix
gxyd Dec 18, 2017
5125779
fix pep8
gxyd Dec 18, 2017
ea19b2d
use 'auto_default' instead of 'auto_deprecated'
gxyd Dec 19, 2017
78cd68a
fix warning in docs
gxyd Dec 21, 2017
911bc34
don't raise warnings in sklearn
gxyd Dec 21, 2017
a41459a
fix warning
gxyd Dec 21, 2017
875bad0
change gamma='auto' -> gamma='auto_deprecated'
gxyd Dec 21, 2017
8bb1ae3
fix a few test warnings
gxyd Dec 23, 2017
0c10f92
some more changes
gxyd Dec 23, 2017
6feb798
fix warning
gxyd Dec 24, 2017
c6a9325
fix pycodestyle errors
gxyd Dec 24, 2017
d2febbb
better error message
gxyd Jan 8, 2018
5c0fc3b
improve error message, document 'auto_deprecated'
gxyd Jan 8, 2018
613016f
add entry in whats_new
gxyd Jan 8, 2018
a326d97
Merge branch 'master' into svc_gamma
gxyd Jan 14, 2018
0bd3e2b
move what's new entry to more appropriate section
gxyd Jan 16, 2018
43ad647
revert gamma='scale' change from kernel in ('linear', 'precomputed')
gxyd Jan 16, 2018
4d373d7
revert few more changes
gxyd Jan 16, 2018
f64d8c4
add tests for kernel='linear', 'precomputed' not raising error
gxyd Jan 17, 2018
361646a
fix flake8 error
gxyd Jan 17, 2018
652d72f
add a Note to revert examples, when deprecation ends
gxyd Jan 22, 2018
890ce67
reword NOTE
gxyd Jan 22, 2018
eb7da05
Merge branch 'master' into svc_gamma
gxyd Jan 23, 2018
112b64a
fix messed up addition while resolving merge conflicts
gxyd Jan 23, 2018
ff16c62
small change
gxyd Jan 23, 2018
5ba8ddc
don't raise warning when X_std is approximately 1
gxyd Jan 24, 2018
710d1d9
add comment about test case
gxyd Jan 24, 2018
cc04810
undo using gamma explicitly since, X_std is approx. ~=1
gxyd Jan 24, 2018
521010a
Merge branch 'master' into svc_gamma
gxyd Jan 24, 2018
fddcb32
revert gamma='scale' (part 1)
gxyd Jan 24, 2018
d4e041e
revert, unrelated change
gxyd Jan 24, 2018
01d047e
revert complete
gxyd Jan 24, 2018
4db1841
use assert_array_almost_equal instead of assert_array_equal
gxyd Jan 26, 2018
cbbe801
don't raise warning for a callable
gxyd Jan 27, 2018
02f20e4
Merge branch 'master' into hello_world
gxyd Mar 9, 2018
c9e866c
address lesteve's comments
gxyd Mar 9, 2018
6cd50ed
DeprecationWarning -> FutureWarning
qinhanmin2014 Mar 10, 2018
e4a9a37
remove versionchanged
qinhanmin2014 Mar 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/modules/ensemble.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ Vector Machine, a Decision Tree, and a K-nearest neighbor classifier::
>>> # Training classifiers
>>> clf1 = DecisionTreeClassifier(max_depth=4)
>>> clf2 = KNeighborsClassifier(n_neighbors=7)
>>> clf3 = SVC(kernel='rbf', probability=True)
>>> clf3 = SVC(gamma='scale', kernel='rbf', probability=True)
>>> eclf = VotingClassifier(estimators=[('dt', clf1), ('knn', clf2), ('svc', clf3)], voting='soft', weights=[2,1,2])

>>> clf1 = clf1.fit(X,y)
Expand Down
6 changes: 3 additions & 3 deletions doc/modules/model_evaluation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ Usage examples:
>>> from sklearn.model_selection import cross_val_score
>>> iris = datasets.load_iris()
>>> X, y = iris.data, iris.target
>>> clf = svm.SVC(probability=True, random_state=0)
>>> clf = svm.SVC(gamma='scale', probability=True, random_state=0)
>>> cross_val_score(clf, X, y, scoring='neg_log_loss') # doctest: +ELLIPSIS
array([-0.07..., -0.16..., -0.06...])
array([-0.09..., -0.16..., -0.07...])
>>> model = svm.SVC()
>>> cross_val_score(model, X, y, scoring='wrong_choice')
Traceback (most recent call last):
Expand Down Expand Up @@ -1775,7 +1775,7 @@ Next, let's compare the accuracy of ``SVC`` and ``most_frequent``::
We see that ``SVC`` doesn't do much better than a dummy classifier. Now, let's
change the kernel::

>>> clf = SVC(kernel='rbf', C=1).fit(X_train, y_train)
>>> clf = SVC(gamma='scale', kernel='rbf', C=1).fit(X_train, y_train)
>>> clf.score(X_test, y_test) # doctest: +ELLIPSIS
0.97...

Expand Down
4 changes: 2 additions & 2 deletions doc/modules/model_persistence.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ persistence model, namely `pickle <https://docs.python.org/2/library/pickle.html

>>> from sklearn import svm
>>> from sklearn import datasets
>>> clf = svm.SVC()
>>> clf = svm.SVC(gamma='scale')
>>> iris = datasets.load_iris()
>>> X, y = iris.data, iris.target
>>> clf.fit(X, y) # doctest: +NORMALIZE_WHITESPACE
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
decision_function_shape='ovr', degree=3, gamma='auto', kernel='rbf',
decision_function_shape='ovr', degree=3, gamma='scale', kernel='rbf',
max_iter=-1, probability=False, random_state=None, shrinking=True,
tol=0.001, verbose=False)

Expand Down
4 changes: 2 additions & 2 deletions doc/modules/pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ object::
>>> from sklearn.datasets import load_digits
>>> digits = load_digits()
>>> pca1 = PCA()
>>> svm1 = SVC()
>>> svm1 = SVC(gamma='scale')
>>> pipe = Pipeline([('reduce_dim', pca1), ('clf', svm1)])
>>> pipe.fit(digits.data, digits.target)
... # doctest: +NORMALIZE_WHITESPACE, +ELLIPSIS
Expand All @@ -193,7 +193,7 @@ object::

>>> cachedir = mkdtemp()
>>> pca2 = PCA()
>>> svm2 = SVC()
>>> svm2 = SVC(gamma='scale')
>>> cached_pipe = Pipeline([('reduce_dim', pca2), ('clf', svm2)],
... memory=cachedir)
>>> cached_pipe.fit(digits.data, digits.target)
Expand Down
15 changes: 8 additions & 7 deletions doc/modules/svm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ n_features]`` holding the training samples, and an array y of class labels
>>> from sklearn import svm
>>> X = [[0, 0], [1, 1]]
>>> y = [0, 1]
>>> clf = svm.SVC()
>>> clf = svm.SVC(gamma='scale')
>>> clf.fit(X, y) # doctest: +NORMALIZE_WHITESPACE
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
decision_function_shape='ovr', degree=3, gamma='auto', kernel='rbf',
decision_function_shape='ovr', degree=3, gamma='scale', kernel='rbf',
max_iter=-1, probability=False, random_state=None, shrinking=True,
tol=0.001, verbose=False)

Expand Down Expand Up @@ -119,10 +119,10 @@ n_classes)``::

>>> X = [[0], [1], [2], [3]]
>>> Y = [0, 1, 2, 3]
>>> clf = svm.SVC(decision_function_shape='ovo')
>>> clf = svm.SVC(gamma='scale', decision_function_shape='ovo')
>>> clf.fit(X, Y) # doctest: +NORMALIZE_WHITESPACE
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
decision_function_shape='ovo', degree=3, gamma='auto', kernel='rbf',
decision_function_shape='ovo', degree=3, gamma='scale', kernel='rbf',
max_iter=-1, probability=False, random_state=None, shrinking=True,
tol=0.001, verbose=False)
>>> dec = clf.decision_function([[1]])
Expand Down Expand Up @@ -318,8 +318,9 @@ floating point values instead of integer values::
>>> y = [0.5, 2.5]
>>> clf = svm.SVR()
>>> clf.fit(X, y) # doctest: +NORMALIZE_WHITESPACE
SVR(C=1.0, cache_size=200, coef0=0.0, degree=3, epsilon=0.1, gamma='auto',
kernel='rbf', max_iter=-1, shrinking=True, tol=0.001, verbose=False)
SVR(C=1.0, cache_size=200, coef0=0.0, degree=3, epsilon=0.1,
gamma='auto_deprecated', kernel='rbf', max_iter=-1, shrinking=True,
tol=0.001, verbose=False)
>>> clf.predict([[1, 1]])
array([ 1.5])

Expand Down Expand Up @@ -534,7 +535,7 @@ test vectors must be provided.
>>> gram = np.dot(X, X.T)
>>> clf.fit(gram, y) # doctest: +NORMALIZE_WHITESPACE
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
decision_function_shape='ovr', degree=3, gamma='auto',
decision_function_shape='ovr', degree=3, gamma='auto_deprecated',
kernel='precomputed', max_iter=-1, probability=False,
random_state=None, shrinking=True, tol=0.001, verbose=False)
>>> # predict on training examples
Expand Down
25 changes: 13 additions & 12 deletions doc/tutorial/basic/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ persistence model, `pickle <https://docs.python.org/2/library/pickle.html>`_::

>>> from sklearn import svm
>>> from sklearn import datasets
>>> clf = svm.SVC()
>>> clf = svm.SVC(gamma='scale')
>>> iris = datasets.load_iris()
>>> X, y = iris.data, iris.target
>>> clf.fit(X, y) # doctest: +NORMALIZE_WHITESPACE
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
decision_function_shape='ovr', degree=3, gamma='auto', kernel='rbf',
decision_function_shape='ovr', degree=3, gamma='scale', kernel='rbf',
max_iter=-1, probability=False, random_state=None, shrinking=True,
tol=0.001, verbose=False)

Expand Down Expand Up @@ -291,10 +291,10 @@ maintained::
>>> from sklearn import datasets
>>> from sklearn.svm import SVC
>>> iris = datasets.load_iris()
>>> clf = SVC()
>>> clf = SVC(gamma='scale')
>>> clf.fit(iris.data, iris.target) # doctest: +NORMALIZE_WHITESPACE
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
decision_function_shape='ovr', degree=3, gamma='auto', kernel='rbf',
decision_function_shape='ovr', degree=3, gamma='scale', kernel='rbf',
max_iter=-1, probability=False, random_state=None, shrinking=True,
tol=0.001, verbose=False)

Expand All @@ -303,7 +303,7 @@ maintained::

>>> clf.fit(iris.data, iris.target_names[iris.target]) # doctest: +NORMALIZE_WHITESPACE
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
decision_function_shape='ovr', degree=3, gamma='auto', kernel='rbf',
decision_function_shape='ovr', degree=3, gamma='scale', kernel='rbf',
max_iter=-1, probability=False, random_state=None, shrinking=True,
tol=0.001, verbose=False)

Expand Down Expand Up @@ -332,19 +332,19 @@ more than once will overwrite what was learned by any previous ``fit()``::
>>> clf = SVC()
>>> clf.set_params(kernel='linear').fit(X, y) # doctest: +NORMALIZE_WHITESPACE
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
decision_function_shape='ovr', degree=3, gamma='auto', kernel='linear',
max_iter=-1, probability=False, random_state=None, shrinking=True,
tol=0.001, verbose=False)
decision_function_shape='ovr', degree=3, gamma='auto_deprecated',
kernel='linear', max_iter=-1, probability=False, random_state=None,
shrinking=True, tol=0.001, verbose=False)
>>> clf.predict(X_test)
array([1, 0, 1, 1, 0])

>>> clf.set_params(kernel='rbf').fit(X, y) # doctest: +NORMALIZE_WHITESPACE
>>> clf.set_params(kernel='rbf', gamma='scale').fit(X, y) # doctest: +NORMALIZE_WHITESPACE
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
decision_function_shape='ovr', degree=3, gamma='auto', kernel='rbf',
decision_function_shape='ovr', degree=3, gamma='scale', kernel='rbf',
max_iter=-1, probability=False, random_state=None, shrinking=True,
tol=0.001, verbose=False)
>>> clf.predict(X_test)
array([0, 0, 0, 1, 0])
array([1, 0, 1, 1, 0])

Here, the default kernel ``rbf`` is first changed to ``linear`` after the
estimator has been constructed via ``SVC()``, and changed back to ``rbf`` to
Expand All @@ -364,7 +364,8 @@ the target data fit upon::
>>> X = [[1, 2], [2, 4], [4, 5], [3, 2], [3, 1]]
>>> y = [0, 0, 1, 1, 2]

>>> classif = OneVsRestClassifier(estimator=SVC(random_state=0))
>>> classif = OneVsRestClassifier(estimator=SVC(gamma='scale',
... random_state=0))
>>> classif.fit(X, y).predict(X)
array([0, 0, 1, 1, 2])

Expand Down
6 changes: 3 additions & 3 deletions doc/tutorial/statistical_inference/supervised_learning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,9 @@ classification --:class:`SVC` (Support Vector Classification).
>>> svc = svm.SVC(kernel='linear')
>>> svc.fit(iris_X_train, iris_y_train) # doctest: +NORMALIZE_WHITESPACE
SVC(C=1.0, cache_size=200, class_weight=None, coef0=0.0,
decision_function_shape='ovr', degree=3, gamma='auto', kernel='linear',
max_iter=-1, probability=False, random_state=None, shrinking=True,
tol=0.001, verbose=False)
decision_function_shape='ovr', degree=3, gamma='auto_deprecated',
kernel='linear', max_iter=-1, probability=False, random_state=None,
shrinking=True, tol=0.001, verbose=False)


.. warning:: **Normalizing data**
Expand Down
6 changes: 6 additions & 0 deletions doc/whats_new/v0.20.rst
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,12 @@ Linear, kernelized and related models
estimators will report at most ``max_iter`` iterations even if more were
performed. :issue:`10723` by `Joel Nothman`_.

- The default value of ``gamma`` parameter of :class:`svm.SVC`,
:class:`svm.NuSVC`, :class:`svm.SVR`, :class:`NuSVR`, :class:`OneClassSVM`
will change from ``'auto'`` to ``'scale'`` in version 0.22 to account
better for unscaled features. :issue:`8361` by :user:`Gaurav Dhingra <gxyd>`
and :user:`Ting Neo <neokt>`.

Metrics

- Deprecate ``reorder`` parameter in :func:`metrics.auc` as it's no longer required
Expand Down
28 changes: 16 additions & 12 deletions sklearn/ensemble/tests/test_bagging.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def test_classification():
Perceptron(tol=1e-3),
DecisionTreeClassifier(),
KNeighborsClassifier(),
SVC()]:
SVC(gamma="scale")]:
for params in grid:
BaggingClassifier(base_estimator=base_estimator,
random_state=rng,
Expand Down Expand Up @@ -115,20 +115,22 @@ def fit(self, X, y):
for f in ['predict', 'predict_proba', 'predict_log_proba', 'decision_function']:
# Trained on sparse format
sparse_classifier = BaggingClassifier(
base_estimator=CustomSVC(decision_function_shape='ovr'),
base_estimator=CustomSVC(gamma='scale',
decision_function_shape='ovr'),
random_state=1,
**params
).fit(X_train_sparse, y_train)
sparse_results = getattr(sparse_classifier, f)(X_test_sparse)

# Trained on dense format
dense_classifier = BaggingClassifier(
base_estimator=CustomSVC(decision_function_shape='ovr'),
base_estimator=CustomSVC(gamma='scale',
decision_function_shape='ovr'),
random_state=1,
**params
).fit(X_train, y_train)
dense_results = getattr(dense_classifier, f)(X_test)
assert_array_equal(sparse_results, dense_results)
assert_array_almost_equal(sparse_results, dense_results)

sparse_type = type(X_train_sparse)
types = [i.data_type_ for i in sparse_classifier.estimators_]
Expand All @@ -151,7 +153,7 @@ def test_regression():
DummyRegressor(),
DecisionTreeRegressor(),
KNeighborsRegressor(),
SVR()]:
SVR(gamma='scale')]:
for params in grid:
BaggingRegressor(base_estimator=base_estimator,
random_state=rng,
Expand Down Expand Up @@ -197,15 +199,15 @@ def fit(self, X, y):

# Trained on sparse format
sparse_classifier = BaggingRegressor(
base_estimator=CustomSVR(),
base_estimator=CustomSVR(gamma='scale'),
random_state=1,
**params
).fit(X_train_sparse, y_train)
sparse_results = sparse_classifier.predict(X_test_sparse)

# Trained on dense format
dense_results = BaggingRegressor(
base_estimator=CustomSVR(),
base_estimator=CustomSVR(gamma='scale'),
random_state=1,
**params
).fit(X_train, y_train).predict(X_test)
Expand Down Expand Up @@ -310,7 +312,7 @@ def test_oob_score_classification():
iris.target,
random_state=rng)

for base_estimator in [DecisionTreeClassifier(), SVC()]:
for base_estimator in [DecisionTreeClassifier(), SVC(gamma="scale")]:
clf = BaggingClassifier(base_estimator=base_estimator,
n_estimators=100,
bootstrap=True,
Expand Down Expand Up @@ -440,7 +442,8 @@ def test_parallel_classification():
assert_array_almost_equal(y1, y3)

# decision_function
ensemble = BaggingClassifier(SVC(decision_function_shape='ovr'),
ensemble = BaggingClassifier(SVC(gamma='scale',
decision_function_shape='ovr'),
n_jobs=3,
random_state=0).fit(X_train, y_train)

Expand All @@ -457,7 +460,8 @@ def test_parallel_classification():
"".format(X_test.shape[1], X_err.shape[1]),
ensemble.decision_function, X_err)

ensemble = BaggingClassifier(SVC(decision_function_shape='ovr'),
ensemble = BaggingClassifier(SVC(gamma='scale',
decision_function_shape='ovr'),
n_jobs=1,
random_state=0).fit(X_train, y_train)

Expand Down Expand Up @@ -501,7 +505,7 @@ def test_gridsearch():
parameters = {'n_estimators': (1, 2),
'base_estimator__C': (1, 2)}

GridSearchCV(BaggingClassifier(SVC()),
GridSearchCV(BaggingClassifier(SVC(gamma="scale")),
parameters,
scoring="roc_auc").fit(X, y)

Expand Down Expand Up @@ -550,7 +554,7 @@ def test_base_estimator():

assert_true(isinstance(ensemble.base_estimator_, DecisionTreeRegressor))

ensemble = BaggingRegressor(SVR(),
ensemble = BaggingRegressor(SVR(gamma='scale'),
n_jobs=3,
random_state=0).fit(X_train, y_train)
assert_true(isinstance(ensemble.base_estimator_, SVR))
Expand Down
2 changes: 1 addition & 1 deletion sklearn/ensemble/tests/test_voting_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def test_sample_weight():
"""Tests sample_weight parameter of VotingClassifier"""
clf1 = LogisticRegression(random_state=123)
clf2 = RandomForestClassifier(random_state=123)
clf3 = SVC(probability=True, random_state=123)
clf3 = SVC(gamma='scale', probability=True, random_state=123)
eclf1 = VotingClassifier(estimators=[
('lr', clf1), ('rf', clf2), ('svc', clf3)],
voting='soft').fit(X, y, sample_weight=np.ones((len(y),)))
Expand Down
16 changes: 7 additions & 9 deletions sklearn/ensemble/tests/test_weight_boosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,29 +280,27 @@ def test_error():
def test_base_estimator():
# Test different base estimators.
from sklearn.ensemble import RandomForestClassifier
from sklearn.svm import SVC

# XXX doesn't work with y_class because RF doesn't support classes_
# Shouldn't AdaBoost run a LabelBinarizer?
clf = AdaBoostClassifier(RandomForestClassifier())
clf.fit(X, y_regr)

clf = AdaBoostClassifier(SVC(), algorithm="SAMME")
clf = AdaBoostClassifier(SVC(gamma="scale"), algorithm="SAMME")
clf.fit(X, y_class)

from sklearn.ensemble import RandomForestRegressor
from sklearn.svm import SVR

clf = AdaBoostRegressor(RandomForestRegressor(), random_state=0)
clf.fit(X, y_regr)

clf = AdaBoostRegressor(SVR(), random_state=0)
clf = AdaBoostRegressor(SVR(gamma='scale'), random_state=0)
clf.fit(X, y_regr)

# Check that an empty discrete ensemble fails in fit, not predict.
X_fail = [[1, 1], [1, 1], [1, 1], [1, 1]]
y_fail = ["foo", "bar", 1, 2]
clf = AdaBoostClassifier(SVC(), algorithm="SAMME")
clf = AdaBoostClassifier(SVC(gamma="scale"), algorithm="SAMME")
assert_raises_regexp(ValueError, "worse than random",
clf.fit, X_fail, y_fail)

Expand Down Expand Up @@ -344,14 +342,14 @@ def fit(self, X, y, sample_weight=None):

# Trained on sparse format
sparse_classifier = AdaBoostClassifier(
base_estimator=CustomSVC(probability=True),
base_estimator=CustomSVC(gamma='scale', probability=True),
random_state=1,
algorithm="SAMME"
).fit(X_train_sparse, y_train)

# Trained on dense format
dense_classifier = AdaBoostClassifier(
base_estimator=CustomSVC(probability=True),
base_estimator=CustomSVC(gamma='scale', probability=True),
random_state=1,
algorithm="SAMME"
).fit(X_train, y_train)
Expand Down Expand Up @@ -438,13 +436,13 @@ def fit(self, X, y, sample_weight=None):

# Trained on sparse format
sparse_classifier = AdaBoostRegressor(
base_estimator=CustomSVR(),
base_estimator=CustomSVR(gamma='scale'),
random_state=1
).fit(X_train_sparse, y_train)

# Trained on dense format
dense_classifier = dense_results = AdaBoostRegressor(
base_estimator=CustomSVR(),
base_estimator=CustomSVR(gamma='scale'),
random_state=1
).fit(X_train, y_train)

Expand Down
Loading