Skip to content

Commit

Permalink
[DOC] Make random_state descriptions for Mixture Models (#16307)
Browse files Browse the repository at this point in the history
  • Loading branch information
DatenBiene committed Jan 30, 2020
1 parent 5ea6a26 commit 06b1a19
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
3 changes: 2 additions & 1 deletion sklearn/mixture/_base.py
Expand Up @@ -137,7 +137,8 @@ def _initialize_parameters(self, X, random_state):
X : array-like, shape (n_samples, n_features)
random_state : RandomState
A random number generator instance.
A random number generator instance that controls the random seed
used for the method chosen to initialize the parameters.
"""
n_samples, _ = X.shape

Expand Down
10 changes: 6 additions & 4 deletions sklearn/mixture/_bayesian_mixture.py
Expand Up @@ -164,10 +164,12 @@ class BayesianGaussianMixture(BaseMixture):
float if 'spherical'
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`.
Controls the random seed given to the method chosen to initialize the
parameters (see `init_params`).
In addition, it controls the generation of random samples from the
fitted distribution (see the method `sample`).
Pass an int for reproducible output across multiple function calls.
See :term:`Glossary <random_state>`.
warm_start : bool, default to False.
If 'warm_start' is True, the solution of the last fitting is used as
Expand Down
10 changes: 6 additions & 4 deletions sklearn/mixture/_gaussian_mixture.py
Expand Up @@ -502,10 +502,12 @@ class GaussianMixture(BaseMixture):
(n_components, n_features, n_features) if 'full'
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`.
Controls the random seed given to the method chosen to initialize the
parameters (see `init_params`).
In addition, it controls the generation of random samples from the
fitted distribution (see the method `sample`).
Pass an int for reproducible output across multiple function calls.
See :term:`Glossary <random_state>`.
warm_start : bool, default to False.
If 'warm_start' is True, the solution of the last fitting is used as
Expand Down

0 comments on commit 06b1a19

Please sign in to comment.