-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
[MRG+1] Disabled randomized_svd warning when number of iterations is no… #6749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
"achieve higher precision.") | ||
if n_iter_specified: | ||
warnings.warn("The number of power iterations is increased to " | ||
"7 to achieve higher precision.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: can you please fix the indentation level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to be late, I will check it carefully next time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that be the opposite? It should be raise when it was not specified!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait why are we changing n_iter
here if it was explicitly given? I don't understand the logic. We should do either a good default or we should do what the user said. If the user provided n_iter
we should do what she said IMHO.
+1 for merge. Thanks @jordisoler. |
@@ -349,6 +349,13 @@ def randomized_svd(M, n_components, n_oversamples=10, n_iter=4, | |||
n_random = n_components + n_oversamples | |||
n_samples, n_features = M.shape | |||
|
|||
if n_iter == None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if n_iter is None
Even if that doesn't make such a big difference, this is the usual way of comparing against None.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Sorry for that, and thanks
LGTM |
will fix the indent in master. thx @jordisoler |
Disabled randomized_svd warning when number of iterations is not specified (#6746)