-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Wrong documentation of gridsearch.ParameterSampler #7364
Copy link
Copy link
Closed
Description
In the documentation of gridsearch.ParameterSampler it is stated:
Note that as of SciPy 0.12, the scipy.stats.distributions do not accept a custom RNG instance and always use the singleton RNG from numpy.random. Hence setting random_state will not guarantee a deterministic iteration whenever scipy.stats distributions are used to define the parameter search space.
This is not really true and misleading. As of SciPy 0.16 you can easily set the random state of a distribution with
from scipy import stats
dist = stats.norm(loc=-1., scale=2.)
dist.random_state = 42
Therefore, one should rather point out to the user that one needs to additionally set the random state as shown above in order to get deterministic results.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels