Skip to content
Snippets Groups Projects
Commit 80e6ec2e authored by Andreas Mueller's avatar Andreas Mueller
Browse files

MISC don't use private ``set_params`` method as that raises a warning.

parent 42e33f33
No related branches found
No related tags found
No related merge requests found
......@@ -253,7 +253,7 @@ We can choose `alpha` to minimize left out error, this time using the
diabetes dataset, rather than our synthetic data::
>>> alphas = np.logspace(-4, -1, 6)
>>> print [regr._set_params(alpha=alpha
>>> print [regr.set_params(alpha=alpha
... ).fit(diabetes_X_train, diabetes_y_train,
... ).score(diabetes_X_test, diabetes_y_test) for alpha in alphas] # doctest: +ELLIPSIS
[0.5851110683883..., 0.5852073015444..., 0.5854677540698..., 0.5855512036503..., 0.5830717085554..., 0.57058999437...]
......@@ -319,7 +319,7 @@ application of Occam's razor: `prefer simpler models`.
::
>>> regr = linear_model.Lasso(alpha=.1)
>>> print [regr._set_params(alpha=alpha
>>> print [regr.set_params(alpha=alpha
... ).fit(diabetes_X_train, diabetes_y_train
... ).score(diabetes_X_test, diabetes_y_test)
... for alpha in alphas] # doctest: +ELLIPSIS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment