The following warning appears in 03_classification.ipynb example (in 2 places):
/home/ageron/.virtualenvs/ml/lib/python3.5/site-packages/sklearn/linear_model/stochastic_gradient.py:84: FutureWarning: max_iter and tol parameters have been added in
in 0.19. If both are left unset, they default to max_iter=5 and tol=None. If tol is not None, max_iter defaults to max_iter=1000. From 0.21, default max_iter will be 1000, and default tol will be 1e-3.
"and default tol will be 1e-3." % type(self), FutureWarning)
What does this warning mean and anything should be corrected in the provided example?
Hi @kenorb,
Thanks for your question. This is a warning that was added in scikit-learn 0.19.0. You can just ignore it for now. It explains that new parameters were added. I cannot set them because I want my code examples to work with previous versions of scikit-learn, but if you are getting this warning, you can fix it by setting max_iter=1000 (or any other value).
Hope this helps.
How to ignore this error?
just set max_iter=5, tol=-np.infty, as the author has written in the jupyter notebook of this chapter. Besides, do not obtain the MNIST data using tensorflow.keras.datasets, because this would cause error about the dimensions of the array in the sequent console.
Most helpful comment
Hi @kenorb,
Thanks for your question. This is a warning that was added in scikit-learn 0.19.0. You can just ignore it for now. It explains that new parameters were added. I cannot set them because I want my code examples to work with previous versions of scikit-learn, but if you are getting this warning, you can fix it by setting max_iter=1000 (or any other value).
Hope this helps.