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
i'm not sure that i understand correctly. are you saying that the performance of your estimator is lower with a fixed random_state vs not providing it?
If so, be aware that (in certain methods) the results of training are stochastic and depend on random_state. Thus, in your specific case, setting a random state just happened to (one could say randomly) lead to a slightly worse result than seeding the training routine with the global numpy random state.
The purpose of random_state is to enhance reproducibility, and minor differences are to be expected across different values of random_state (try setting the seed to different values and observe that the performance will increase or decrease).
If my interpretation of your question was incorrect, please clarify.
I can imagine this sort of thing coming about by that random state value (rather than sharing a generator, or values generated) being passed to multiple sub-estimators, so that they all have the same randomisation.
Activity
nelson-liu commentedon Sep 13, 2016
i'm not sure that i understand correctly. are you saying that the performance of your estimator is lower with a fixed
random_statevs not providing it?If so, be aware that (in certain methods) the results of training are stochastic and depend on
random_state. Thus, in your specific case, setting a random state just happened to (one could say randomly) lead to a slightly worse result than seeding the training routine with the global numpy random state.The purpose of
random_stateis to enhance reproducibility, and minor differences are to be expected across different values ofrandom_state(try setting the seed to different values and observe that the performance will increase or decrease).If my interpretation of your question was incorrect, please clarify.
StevenLOL commentedon Sep 13, 2016
I just test with random_state=int(time.time())
30 rounds average shows that it is worse than not set at all. ( 0.732 MAE vs 0.621)
Seems that it happened as well as a value is assigned , not only for a fixed random_state .
jnothman commentedon Sep 13, 2016
I can imagine this sort of thing coming about by that random state value (rather than sharing a generator, or values generated) being passed to multiple sub-estimators, so that they all have the same randomisation.
jnothman commentedon Sep 13, 2016
Indeed, that's what's happening: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/weight_boosting.py#L1001
StevenLOL commentedon Sep 13, 2016
OK, here is a quick test
set random_state=int(time.time()) to see the differences. , 16+- vs 49+-
jnothman commentedon Sep 13, 2016
I have a half-completed patch. Will post in a few hours.
FIX adaboost estimators not randomising correctly
jnothman commentedon Sep 13, 2016
See #7411. For good or bad, that PR goes beyond the scope of just fixing this issue, so it might take a little time to review and merge.
StevenLOL commentedon Sep 14, 2016
Cool, thanks.
jnothman commentedon Sep 14, 2016
We usually close after the bug is fixed.
StevenLOL commentedon Sep 14, 2016
OK, thanks.
FIX adaboost estimators not randomising correctly
FIX adaboost estimators not randomising correctly
FIX adaboost estimators not randomising correctly
[MRG+2] FIX adaboost estimators not randomising correctly (#7411)
[MRG+2] FIX adaboost estimators not randomising correctly (#7411)
[MRG+2] FIX adaboost estimators not randomising correctly (scikit-lea…
[MRG+2] FIX adaboost estimators not randomising correctly (scikit-lea…
[MRG+2] FIX adaboost estimators not randomising correctly (scikit-lea…