You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecate n_iter in SGDClassifier and implement max_iter. #5022
We should implement a stopping condition based on the scaled norm of the parameter update as done in the new SAG solver for LogisticRegression / Ridge. The convergence check should be done at the end of the each epoch to avoid introducing too much overhead.
Other classes sharing the same underlying implementation should be updated as well, e.g.:
SGDRegressor
PassiveAggressiveClassifier
Perceptron
maybe others.
We should store the effective number of iterations in a new n_iter_ attribute on the estimator at the end of fit as done in many other scikit-learn model that accept a max_iter hyperparam.
Ok :) About deprecation, is it the correct way to do it ? :
SGDClassifier().fit(X,y) may change its behavior, but SGDClassifier(n_iter=10).fit(X,y) should behave the same as before and raise a DeprecationWarning.
What about ? :
add parameters max_iter=5 and tol=1e-4. also change n_iter=None
if n_iter is not None, use max_iter = n_iter and tol = 0.
Should n_iter stay at the same place in the parameters?
Activity
ogrisel commentedon Jul 23, 2015
@TomDLT this one is for you if you like ;)
TomDLT commentedon Jul 24, 2015
Ok :)
About deprecation, is it the correct way to do it ? :
SGDClassifier().fit(X,y)may change its behavior, butSGDClassifier(n_iter=10).fit(X,y)should behave the same as before and raise a DeprecationWarning.What about ? :
max_iter=5andtol=1e-4. also changen_iter=Nonen_iter is not None, usemax_iter = n_iterandtol = 0.Should
n_iterstay at the same place in the parameters?amueller commentedon Jul 30, 2015
hm... or we could directly go all the way and do a validation set? ;)
amueller commentedon Jul 30, 2015
but yeah, first doing
max_iteris probably a good idea.qinhanmin2014 commentedon May 29, 2018
Resolved in #5036