10000 [MRG+2] fix warning and behavior in randomized_svd wrt power iterations by amueller · Pull Request #7311 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG+2] fix warning and behavior in randomized_svd wrt power iterations #7311

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

Closed

Conversation

amueller
Copy link
Member

Trying to fix the warning mess left by #5299 and #6749 (issue #6746).

@amueller
Copy link
Member Author

ping @giorgiop was that the intended behavior?
also ping @nelson-liu who looked at this before.

I changed the default value of randomized_svd to auto. If someone is explicitly passing None for some reason, that will now break. This is not really "public API" so ....

Also, now, if a user gives a particular integer, we will actually do what they said!

@amueller amueller added this to the 0.18 milestone Aug 31, 2016
@amueller
Copy link
Member Author

also ping @ogrisel who reviewed #6749

@GaelVaroquaux GaelVaroquaux changed the title fix warning and behavior in randomized_svd wrt power iterations [MRG+1] fix warning and behavior in randomized_svd wrt power iterations Aug 31, 2016
@GaelVaroquaux
Copy link
Member

LGTM.

The code is indeed much nicer than with the n_iter_specified.

Do we have an idea, a track record of any particular reason that we ended up with this variable (n_iter_specified)? Cc @giorgiop

@GaelVaroquaux
Copy link
Member

@amueller Before merge, you have a docstring that you need to fix: it gives a failing doctest.

@amueller amueller force-pushed the power_iteration_warning branch from dd1e77d to 970ace9 Compare August 31, 2016 20:46
is set to 7, unless the user specifies a higher number. This improves
precision with few components.
problems. When 'auto', it is set to 4, unless `n_components` is small
(< .1 * min(X.shape)) `n_iter` in which case is set to 7.
8000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe i'm being slow, but i'm not sure what this sentence means.

Copy link
Member
@ogrisel ogrisel Sep 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the following would be clearer:

When `n_iter='auto'`, it is effectively set to 4 to when `n_components` is larger than
`0.1 * min(X.shape)` and set to 7 otherwise.

@nelson-liu
Copy link
Contributor

LGTM as well besides failing doctest / the sentence I can't comprehend.

@ogrisel
Copy link
Member
ogrisel commented Sep 1, 2016

Besides the failing doctest, LGTM as well.

@ogrisel ogrisel changed the title [MRG+1] fix warning and behavior in randomized_svd wrt power iterations [MRG+2] fix warning and behavior in randomized_svd wrt power iterations Sep 1, 2016
@tguillemot
Copy link
Contributor

@amueller The failings come from the iterated_power=4 (instead iterated_power=auto) in pipeline.rst.

@ogrisel
Copy link
Member
ogrisel commented Sep 6, 2016

I rebased, fixed the doctests and merged.

@amueller
Copy link
Member Author
amueller commented Sep 6, 2016

thanks @ogrisel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0