Repository navigation
Description
We recently added a Glossary to our documentation, which describes common parameters among other things. We should now replace descriptions of random_state parameters to make them more concise and informative (see #10415). For example, instead of
random_state : int, RandomState instance or None, optional, default: None
If int, random_state is the seed used by the random number generator;
If RandomState instance, random_state is the random number generator;
If None, the random number generator is the RandomState instance used
by `np.random`.
in both KMeans and MiniBatchKMeans, we might have:
KMeans:
random_state : int, RandomState instance, default=None
Determines random number generation for centroid initialization.
Pass an int for reproducible results across multiple function calls.
See :term:`Glossary <random_state>`.
MiniBatchKMeans:
random_state : int, RandomState instance, default=None
Determines random number generation for centroid initialization and
random reassignment.
Pass an int for reproducible results across multiple function calls.
See :term:`Glossary <random_state>`.
Therefore, the description should focus on what is the impact of random_state on the algorithm.
Contributors interested in contributing this change should take on one module at a time, initially.
The list of estimators to be modified is the following:
List of files to modify using kwinata script
-
sklearn/utils/random.py - 39 open PR
-
sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py - 736, 918
-
sklearn/ensemble/_hist_gradient_boosting/binning.py - 37, 112
-
sklearn/ensemble/_weight_boosting.py - 188, 324, 479, 900, 1022
-
sklearn/decomposition/_dict_learning.py - 364, 485, 692, 1135, 1325 Open PR
-
sklearn/decomposition/_fastica.py - 205, 344 Open PR
-
sklearn/decomposition/_pca.py - 192 Open PR
-
sklearn/decomposition/_sparse_pca.py - 82, 285 Open PR
-
sklearn/decomposition/_lda.py - 60, 79, 225 Open PR
-
sklearn/cluster/_kmeans.py - 56, 241, 380, 583, 700, 1150, 1370
-
sklearn/linear_model/_ransac.py - 152 Open PR
-
sklearn/linear_model/_coordinate_descent.py - 580, 860, 1313, 1487, 1665, 1851, 2016, 2192 Open PR
-
sklearn/linear_model/_sag.py - 154 Open PR
-
sklearn/linear_model/_passive_aggressive.py - 76, 322 Open PR
-
sklearn/linear_model/_logistic.py - 587, 924, 1100, 1658 Open PR
-
sklearn/linear_model/_stochastic_gradient.py - 369, 811, 1419 Open PR
-
sklearn/linear_model/_ridge.py - 325, 693, 853 Open PR
-
sklearn/svm/_base.py - 853 Open PR
-
sklearn/datasets/_samples_generator.py - 127, 323, 440, 531, 618, 688, 767, 904, 965, 1030, 1106, 1159, 1218, 1258, 1307, 1368, 1420, 1483, 1571, 1662
-
sklearn/model_selection/_split.py - 382, 588, 1091, 1196, 1250, 1390, 1492, 1605, 2049 Open PR
-
sklearn/neural_network/_multilayer_perceptron.py - 782, 1174
-
sklearn/covariance/_robust_covariance.py - 63, 233, 328, 545
Activity
aby0 commentedon Jan 29, 2018
Hi @jnothman, Can I take this issue? Thanks
jnothman commentedon Jan 29, 2018
aby0 commentedon Jan 29, 2018
@jnothman I am sorry for being naive but can you elaborate about the module/submodule? I mean are you referring to a sub-package like Kmeans for instance?
lesteve commentedon Jan 29, 2018
I think what @jnothman means is just start with one file, for example sklearn/cluster/k_means_.py, update the
random_statedocstring as in the top post and open a PR.jnothman commentedon Jan 29, 2018
aby0 commentedon Jan 30, 2018
Thanks. Will do that and open a PR.
jnothman commentedon Jan 30, 2018
jnothman commentedon Jan 31, 2018
46 remaining items
DatenBiene commentedon Jan 30, 2020
Claim :
sklearn/mixture/_bayesian_mixture.py - 166
sklearn/mixture/_base.py - 139
sklearn/mixture/_gaussian_mixture.py - 504
DatenBiene commentedon Jan 30, 2020
Claim sklearn/ensemble/_gb.py - 887, 1360
DatenBiene commentedon Jan 30, 2020
Claim sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py - 736, 918
GregoireMialon commentedon Jan 30, 2020
Claim sklearn/neural_network/_rbm.py - 59
DatenBiene commentedon Jan 30, 2020
Claim :
sklearn/svm/_classes.py - 90, 312, 546, 752
sklearn/svm/_base.py - 853
DatenBiene commentedon Jan 30, 2020
Claim:
sklearn/feature_selection/_mutual_info.py - 226, 335, 414
sklearn/metrics/cluster/_unsupervised.py - 80
sklearn/utils/_testing.py - 521
sklearn/utils/init.py - 478, 623
DatenBiene commentedon Jan 31, 2020
Claim :
sklearn/dummy.py - 59
sklearn/random_projection.py - 178, 245, 464, 586
jeremiedbb commentedon Feb 12, 2020
@DatenBiene @GregoireMialon Thanks for all your contributions during last sprint. There are only 3 modules left unchecked !
Would you be interested / have time / have motivation to tackle those (no pressure !) ?
GregoireMialon commentedon Feb 13, 2020
DatenBiene commentedon Apr 4, 2020
Hi @jeremiedbb! I will try to finish the 3 remaining modules today 😃
Claim:
sklearn/kernel_approximation.py - 41, 143, 470
sklearn/multiclass.py - 687
sklearn/ensemble/_base.py - 52
DatenBiene commentedon Apr 16, 2020
Hi @jnothman and @jeremiedbb, looks like all the files where modified. I would be happy to help if you find any remaining issues.
cmarmo commentedon Apr 16, 2020
Thanks a lot @DatenBiene and all the contributors that worked to close this issue!
I think we can close this huge one!
Feel free to open new specific issues if something is still missing about
random_statedescription.Fixes scikit-learn#10548 random state description in feature-extracti…