diff --git a/sklearn/utils/extmath.py b/sklearn/utils/extmath.py index 35df3859324ae..7d48333a50c4b 100644 --- a/sklearn/utils/extmath.py +++ b/sklearn/utils/extmath.py @@ -271,7 +271,7 @@ def randomized_svd( power_iteration_normalizer="auto", transpose="auto", flip_sign=True, - random_state="warn", + random_state=None, svd_lapack_driver="gesdd", ): """Compute a truncated randomized SVD. @@ -344,10 +344,7 @@ def randomized_svd( function calls. See :term:`Glossary `. .. versionchanged:: 1.2 - The previous behavior (`random_state=0`) is deprecated, and - from v1.2 the default value will be `random_state=None`. Set - the value of `random_state` explicitly to suppress the deprecation - warning. + The default value changed from 0 to None. svd_lapack_driver : {"gesdd", "gesvd"}, default="gesdd" Whether to use the more efficient divide-and-conquer approach @@ -409,19 +406,6 @@ def randomized_svd( sparse.SparseEfficiencyWarning, ) - if random_state == "warn": - warnings.warn( - "If 'random_state' is not supplied, the current default " - "is to use 0 as a fixed seed. This will change to " - "None in version 1.2 leading to non-deterministic results " - "that better reflect nature of the randomized_svd solver. " - "If you want to silence this warning, set 'random_state' " - "to an integer seed or to None explicitly depending " - "if you want your code to be deterministic or not.", - FutureWarning, - ) - random_state = 0 - random_state = check_random_state(random_state) n_random = n_components + n_oversamples n_samples, n_features = M.shape