Understanding the parameters of SGD in scikitlearn 1) I don't understand well the warm_strat=True and partial_fit method when using stochastic gradient method (for classifier or regressor).
When i manually train a SGD i keep in memory both:


*

*the previous coefficients 

*the actual gradient of the loss
to determine the future coefficients.


I suppose warm_start or fit_partial are used in this context but the documentation is not so clear for me.
2) Since default parameter of SGD_Classifier are: tol=None, n_iter=None how does the classifier know when to stop the iterations ? I am not sure if tol=None mean tol=1e-3...
Thanks
 A: 
I am not sure if tol=None mean tol=1e-3...

No, it doesn't. None means None. Starting from scikitlearn v0.21 the default is 1e-3 instead of None.

2) Since default parameter of SGD_Classifier are: tol=None,
  n_iter=None how does the classifier know when to stop the iterations ?

When you're in doubt, just check the source code for gradient descent: 
    elif self.tol is None and self.max_iter is None:
        if not for_partial_fit:
            warnings.warn(
                "max_iter and tol parameters have been "
                "added in %s 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." % type(self).__name__,
                FutureWarning)
            # Before 0.19, default was n_iter=5
        max_iter = 5

Source: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/stochastic_gradient.py#L122
So when tol=None it will stop after 5 iterations unless you specify max_iter yourself.

I suppose warm_start or fit_partial are used in this context but the
  documentation is not so clear for me.

warm_start does exactly what you do manually: it copies previously calculated coefficients if they exist.
    if self.warm_start and hasattr(self, "coef_"):
        if coef_init is None:
            coef_init = self.coef_
        if intercept_init is None:
            intercept_init = self.intercept_

I'm not sure about fit_partial.
