Repository navigation
DOC clarify eigenvectors shape difference between PCA and KernelPCA - #34581
Merged
Merged
Conversation
|
Thank you for opening your first pull request to scikit-learn! 🎉 To help get your contribution reviewed, please make sure that:
|
lorentzenchr
approved these changes
Nov 30, 2026
lorentzenchr
left a comment
Member
There was a problem hiding this comment.
Thanks for this doc improvement.
lorentzenchr
enabled auto-merge (squash)
November 30, 2026 21:13
Member
|
@Jihanvall Could you fix the linter errors? |
auto-merge was automatically disabled
December 1, 2026 08:31
Head branch was pushed to by a user without write access
Contributor
Author
|
@lorentzenchr Fixed the trailing whitespace, thanks for the review! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reference Issues/PRs
Fixes #17171
What does this implement/fix? Explain your changes.
This PR adds a clarifying note in the KernelPCA documentation (
doc/modules/decomposition.rst) explaining why the eigenvectors shape differs between standardPCAandKernelPCA:components_): shape(n_components, n_features)— computed in the original feature space.alphas_): shape(n_samples, n_components)— computed via eigen-decomposition on the(n_samples, n_samples)Gram/Kernel matrix.This helps prevent confusion for users expecting
alphas_to depend onn_features.First time contributor introduction
I am an AI and Data Science engineer and a first-time contributor to scikit-learn. I wanted to clarify this subtle documentation detail after working with PCA and KernelPCA to make it easier for future users to understand the shape differences.
AI usage disclosure
I used AI assistance for:
Any other comments?
None.