-
-
Notifications
You must be signed in to change notification settings - Fork 26k
[MRG+1] Incorrent implementation of noise_variance_ in PCA._fit_truncated #9108
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d06cbcf
fix noise_variance_
qinhanmin2014 d0d1199
n_features -> n_features - n_samples
qinhanmin2014 217da6e
add regression test
qinhanmin2014 4784285
fix flake8
qinhanmin2014 afb7e9d
fix test error
qinhanmin2014 f0f1245
improve test
qinhanmin2014 200a672
fix doc
qinhanmin2014 c4b7e5e
Merge branch 'master' into my-feature-2
qinhanmin2014 3f3b100
update what's new
qinhanmin2014 2c678c9
fix flake8
qinhanmin2014 58748dd
update
qinhanmin2014 2a9d47e
update
qinhanmin2014 531ae01
update
qinhanmin2014 0131ebb
Improve test by checking noise variance
lesteve a3030f3
Add test for zero noise_variance
lesteve f67c3c7
TST Use solver_list
jnothman 0fdf5b9
test comment
qinhanmin2014 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Could you add a test to make sure that
noise_variance_
is 0 when eithern_components > n_features
orn_components > n_samples
?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.
@lesteve Thanks. Will add in a few day.
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.
I have just pushed a change to do this.
To be honest I think we should look at the validation code that validate that validate n_components vs n_samples and n_features and use a helper function where appropriate. Also in incremental_pca.py as noted in https://github.com/scikit-learn/scikit-learn/pull/9303/files#r131103304.