Skip to content

DOC Correct PCA documentation about sparse input#28416

Merged
glemaitre merged 6 commits intoscikit-learn:mainfrom
lamdang2k:main
Feb 19, 2024
Merged

DOC Correct PCA documentation about sparse input#28416
glemaitre merged 6 commits intoscikit-learn:mainfrom
lamdang2k:main

Conversation

@lamdang2k
Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Correct #28406

What does this implement/fix? Explain your changes.

Adapt documentation to changes coming from release note 1.4: PCA now supports sparse input

Any other comments?

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 13, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: b87380d. Link to the linter CI: here

Comment on lines +133 to +137
It can also use the scipy.sparse.linalg ARPACK implementation of the
truncated SVD.

Notice that this class does not support sparse input. See
:class:`TruncatedSVD` for an alternative with sparse data.
This class now supports `scipy.sparse.sparray` and `scipy.sparse.spmatrix`
inputs when using the ARPACK solver.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would merge this part with the paragraph above:

    With sparse inputs, the ARPACK implementation of the truncated SVD can be
    used through :func:`scipy.sparse.linalg.svds`. Alternatively, one may
    considered :class:`TruncatedSVD` where the data are not centered.

@lamdang2k lamdang2k requested a review from glemaitre February 15, 2024 08:46
@lamdang2k lamdang2k marked this pull request as draft February 15, 2024 09:52
@lamdang2k lamdang2k marked this pull request as ready for review February 15, 2024 10:28
Copy link
Copy Markdown
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks

@glemaitre glemaitre enabled auto-merge (squash) February 19, 2024 10:44
@glemaitre glemaitre merged commit 7370a47 into scikit-learn:main Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants