Join GitHub today
[MRG+1] FIX report n_iter_ as at most max_iter, without always reducing by 1 #10723
changed the title from
[MRG] FIX report n_iter_ faithfully to scipy.optimize
[MRG] FIX report n_iter_ in accordance with scipy.optimize
Feb 28, 2018
LGTM, +1 for faithfully report the result from scipy. I don't think users should blame scikit-learn if they get different results here.
Tricky one. If we don't want to have any issue we should cover this case.
However, we could also expect that user set
Thinking a bit more about it, I think doing
from sklearn.linear_model import HuberRegressor from sklearn.datasets import load_boston X, y = load_boston(return_X_y=True) reg = HuberRegressor(max_iter=1) reg.fit(X, y) print(reg.n_iter_) # 2
I've patched that too, but am happy to roll it back if the consensus is against.…
On 4 March 2018 at 18:51, Hanmin Qin ***@***.***> wrote: ping @jnothman <https://github.com/jnothman> @lesteve <https://github.com/lesteve> @glemaitre <https://github.com/glemaitre> I quickly searched the codebase with git grep "'nit'". It seems that HuberRegressor has the same problem. Should we fix that here? from sklearn.linear_model import HuberRegressorfrom sklearn.datasets import load_boston X, y = load_boston(return_X_y=True) reg = HuberRegressor(max_iter=1) reg.fit(X, y)print(reg.n_iter_)# 2 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#10723 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAEz67e7uMCJaxwaag554R3S96cmdRYEks5ta5z5gaJpZM4SWXHe> .