diff --git a/sklearn/feature_selection/_mutual_info.py b/sklearn/feature_selection/_mutual_info.py index 95d1aeb183a27..5931e7bbc6ef5 100644 --- a/sklearn/feature_selection/_mutual_info.py +++ b/sklearn/feature_selection/_mutual_info.py @@ -224,12 +224,10 @@ def _estimate_mi(X, y, discrete_features='auto', discrete_target=False, data will be overwritten. random_state : int, RandomState instance or None, optional, default None - The seed of the pseudo random number generator for adding small noise - to continuous variables in order to remove repeated values. 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`. + Determines random number generation for adding small noise to + continuous variables in order to remove repeated values. + Pass an int for reproducible results across multiple function calls. + See :term:`Glossary `. Returns ------- @@ -333,12 +331,10 @@ def mutual_info_regression(X, y, discrete_features='auto', n_neighbors=3, data will be overwritten. random_state : int, RandomState instance or None, optional, default None - The seed of the pseudo random number generator for adding small noise - to continuous variables in order to remove repeated values. - 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`. + Determines random number generation for adding small noise to + continuous variables in order to remove repeated values. + Pass an int for reproducible results across multiple function calls. + See :term:`Glossary `. Returns ------- @@ -412,12 +408,10 @@ def mutual_info_classif(X, y, discrete_features='auto', n_neighbors=3, data will be overwritten. random_state : int, RandomState instance or None, optional, default None - The seed of the pseudo random number generator for adding small noise - to continuous variables in order to remove repeated values. 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`. + Determines random number generation for adding small noise to + continuous variables in order to remove repeated values. + Pass an int for reproducible results across multiple function calls. + See :term:`Glossary `. Returns ------- diff --git a/sklearn/metrics/cluster/_unsupervised.py b/sklearn/metrics/cluster/_unsupervised.py index d6fc6fbc82ab0..a0eaa5e84240a 100644 --- a/sklearn/metrics/cluster/_unsupervised.py +++ b/sklearn/metrics/cluster/_unsupervised.py @@ -78,11 +78,10 @@ def silhouette_score(X, labels, metric='euclidean', sample_size=None, If ``sample_size is None``, no sampling is used. random_state : int, RandomState instance or None, optional (default=None) - The generator used to randomly select a subset of samples. 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`. Used when ``sample_size is not None``. + Determines random number generation for selecting a subset of samples. + Used when ``sample_size is not None``. + Pass an int for reproducible results across multiple function calls. + See :term:`Glossary `. **kwds : optional keyword parameters Any further parameters are passed directly to the distance function. diff --git a/sklearn/utils/__init__.py b/sklearn/utils/__init__.py index 5e7605e97f949..6742411148b9b 100644 --- a/sklearn/utils/__init__.py +++ b/sklearn/utils/__init__.py @@ -476,11 +476,10 @@ def resample(*arrays, **options): arrays. random_state : int, RandomState instance or None, optional (default=None) - The seed of the pseudo random number generator to use when shuffling - the data. 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`. + Determines random number generation for shuffling + the data. + Pass an int for reproducible results across multiple function calls. + See :term:`Glossary `. stratify : array-like or None (default=None) If not None, data is split in a stratified fashion, using this as @@ -621,11 +620,10 @@ def shuffle(*arrays, **options): Other Parameters ---------------- random_state : int, RandomState instance or None, optional (default=None) - The seed of the pseudo random number generator to use when shuffling - the data. 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`. + Determines random number generation for shuffling + the data. + Pass an int for reproducible results across multiple function calls. + See :term:`Glossary `. n_samples : int, None by default Number of samples to generate. If left to None this is diff --git a/sklearn/utils/_testing.py b/sklearn/utils/_testing.py index b4a747b1df7ce..931622b3889db 100644 --- a/sklearn/utils/_testing.py +++ b/sklearn/utils/_testing.py @@ -519,10 +519,9 @@ def set_random_state(estimator, random_state=0): estimator : object The estimator random_state : int, RandomState instance or None, optional, default=0 - Pseudo random number generator state. 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`. + Pseudo random number generator state. + Pass an int for reproducible results across multiple function calls. + See :term:`Glossary `. """ if "random_state" in estimator.get_params(): estimator.set_params(random_state=random_state)