Skip to content

[MRG+1] Disabled randomized_svd warning when number of iterations is no…#6749

Merged
agramfort merged 1 commit intoscikit-learn:masterfrom
jordisoler:iss6746
May 9, 2016
Merged

[MRG+1] Disabled randomized_svd warning when number of iterations is no…#6749
agramfort merged 1 commit intoscikit-learn:masterfrom
jordisoler:iss6746

Conversation

@jordisoler
Copy link
Copy Markdown
Contributor

Disabled randomized_svd warning when number of iterations is not specified (#6746)

"achieve higher precision.")
if n_iter_specified:
warnings.warn("The number of power iterations is increased to "
"7 to achieve higher precision.")
Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Member

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!

Copy link
Copy Markdown
Member

@amueller amueller Jul 8, 2016

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.

@ogrisel
Copy link
Copy Markdown
Member

ogrisel commented May 9, 2016

+1 for merge. Thanks @jordisoler.

@ogrisel ogrisel changed the title [MRG] Disabled randomized_svd warning when number of iterations is no… [MRG+1] Disabled randomized_svd warning when number of iterations is no… May 9, 2016
n_random = n_components + n_oversamples
n_samples, n_features = M.shape

if n_iter == None:
Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor Author

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

@giorgiop
Copy link
Copy Markdown
Contributor

giorgiop commented May 9, 2016

LGTM

@agramfort agramfort merged commit a4d070e into scikit-learn:master May 9, 2016
@agramfort
Copy link
Copy Markdown
Member

will fix the indent in master.

thx @jordisoler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants