-
-
Notifications
You must be signed in to change notification settings - Fork 25.6k
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
FIX KernelPCA inverse transform when gamma is not given #26337
Conversation
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.
Hey there @Charlie-XIAO, thanks for the PR! Overall it looks good. I think it is worth including this as a changed model in the changelog since now the same models with gamma=None
may produce different results through their inverse_transform
.
Please feel free to ping me if you have any questions or concerns :)
Hi @Micky774, thanks for your review! I've committed your suggested changes, and moved the changelog to under the "changed models". Please let me know if there are other changes I need to make, or if my wording in the changelog can be improved. |
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, thanks!
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.
Thanks for the PR @Charlie-XIAO. Here are some suggestions, otherwise looks good.
Thanks for your review @jeremiedbb! I've made your suggested changes. |
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. Thansks @Charlie-XIAO
Reference Issues/PRs
Fixes #26280.
What does this implement/fix? Explain your changes.
Quote @jeremiedbb:
This PR intends to set a private attribute
_gamma
at the firstfit
(orfit_transform
) and use_gamma
instead ofgamma
in further transforms.Any other comments?
Not sure if this approach is neat enough, so if maintainers want an alternative approach, please let me know!