@@ -293,7 +293,7 @@ def randomized_svd(
293
293
power_iteration_normalizer = "auto" ,
294
294
transpose = "auto" ,
295
295
flip_sign = True ,
296
- random_state = "warn" ,
296
+ random_state = None ,
297
297
svd_lapack_driver = "gesdd" ,
298
298
):
299
299
"""Compute a truncated randomized SVD.
@@ -366,10 +366,7 @@ def randomized_svd(
366
366
function calls. See :term:`Glossary <random_state>`.
367
367
368
368
.. versionchanged:: 1.2
369
- The previous behavior (`random_state=0`) is deprecated, and
370
- from v1.2 the default value will be `random_state=None`. Set
371
- the value of `random_state` explicitly to suppress the deprecation
372
- warning.
369
+ The default value changed from 0 to None.
373
370
374
371
svd_lapack_driver : {"gesdd", "gesvd"}, default="gesdd"
375
372
Whether to use the more efficient divide-and-conquer approach
@@ -431,19 +428,6 @@ def randomized_svd(
431
428
sparse .SparseEfficiencyWarning ,
432
429
)
433
430
434
- if random_state == "warn" :
435
- warnings .warn (
436
- "If 'random_state' is not supplied, the current default "
437
- "is to use 0 as a fixed seed. This will change to "
438
- "None in version 1.2 leading to non-deterministic results "
439
- "that better reflect nature of the randomized_svd solver. "
440
- "If you want to silence this warning, set 'random_state' "
441
- "to an integer seed or to None explicitly depending "
442
- "if you want your code to be deterministic or not." ,
443
- FutureWarning ,
444
- )
445
- random_state = 0
446
-
447
431
random_state = check_random_state (random_state )
448
432
n_random = n_components + n_oversamples
449
433
n_samples , n_features = M .shape
0 commit comments