-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
Mle pca implementation #19378
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
Mle pca implementation #19378
Conversation
Update to forked repo
…ping and Bishop eq (11)
…ping and Bishop eq (11)
#DataUmbrella sprint |
I think the recommendation of #10137 (comment) is not to change the denominator from |
Thank you @lorentzenchr for your remarks; I will change the docstring accordingly. |
Changed the docstring under Tipping and Bishop to show their understanding of explained variance, but changed explained variance back to the original `explained_variance_ = (S ** 2) / (n_samples-1)`
sklearn/decomposition/_pca.py
Outdated
The explained variance according to the two is | ||
explained_variance_ = (S ** 2) / 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.
The right place to put a comment is above, under the attribute section. There, one should just say that n_samples - 1
degrees of freedoms are used for the variance estimation.
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
@lorentzenchr just committed your suggestion. Thanks for your guidance. |
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.
LGTM
@CeeThinwa Thank you for fixing this doc issue. |
Thank you @CeeThinwa and @fortune-uwha |
…9378) Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
Reference Issues/PRs
Fixes the PCA implementation does not match Tipping and Bishop #10137 issue
What does this implement/fix? Explain your changes.
The explained variance formula did not match Tipping and Bishop eq (11) so this was changed to match the reference material.
Any other comments?
We submitted this in a team of 2; @CeeThinwa and @fortune-uwha for the AFME sklearn sprint