Skip to content

[MRG] Added n_components_ to SparsePCA and MiniBatchSparsePCA - #16981

Merged
thomasjpfan merged 7 commits into
scikit-learn:masterfrom
gorski-m:sparse_pca
Apr 27, 2020
Merged

[MRG] Added n_components_ to SparsePCA and MiniBatchSparsePCA#16981
thomasjpfan merged 7 commits into
scikit-learn:masterfrom
gorski-m:sparse_pca

Conversation

@gorski-m

Copy link
Copy Markdown
Contributor

What does this implement/fix? Explain your changes.

I've added n_components_ parameter to SparsePCA and MiniBatchSparsePCA classes to match the behavior of PCA class. See #16752

@gorski-m gorski-m changed the title Added n_components_ to SparsePCA and MiniBatchSparsePCA [WIP] Added n_components_ to SparsePCA and MiniBatchSparsePCA Apr 21, 2020
@gorski-m

Copy link
Copy Markdown
Contributor Author

@TomDLT could you have a look?

@TomDLT TomDLT left a comment

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.

Nice work !

@gorski-m

Copy link
Copy Markdown
Contributor Author

@jnothman @adrinjalali could you have a look?

@thomasjpfan thomasjpfan left a comment

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.

Thank you for the PR @Reksbril

Comment thread sklearn/decomposition/tests/test_sparse_pca.py Outdated
Comment thread sklearn/decomposition/tests/test_sparse_pca.py Outdated
Comment thread sklearn/decomposition/tests/test_sparse_pca.py Outdated
@thomasjpfan thomasjpfan changed the title [WIP] Added n_components_ to SparsePCA and MiniBatchSparsePCA [MRG] Added n_components_ to SparsePCA and MiniBatchSparsePCA Apr 26, 2020
gorski-m and others added 3 commits April 27, 2020 08:49
@jnothman

Copy link
Copy Markdown
Member

@thomasjpfan does this have your approval?

@thomasjpfan
thomasjpfan merged commit 41b18fe into scikit-learn:master Apr 27, 2020
@thomasjpfan

Copy link
Copy Markdown
Member

tagging for inclusion #17010

adrinjalali pushed a commit that referenced this pull request Apr 30, 2020
* Add n_components_ attribute to SparcePCA and MiniBatchSparsePCA

* Add n_components_ attribute to SparcePCA and MiniBatchSparsePCA

* Add whatsnew entry

* Fix documentation

* Apply suggestions from code review

Co-Authored-By: Thomas J Fan <thomasjpfan@gmail.com>

* Add suggested changes

* Update test_sparse_pca.py

Co-authored-by: Mateusz Górski <mateuszg122@gmail.com>
Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
gio8tisu pushed a commit to gio8tisu/scikit-learn that referenced this pull request May 15, 2020
…earn#16981)

* Add n_components_ attribute to SparcePCA and MiniBatchSparsePCA

* Add n_components_ attribute to SparcePCA and MiniBatchSparsePCA

* Add whatsnew entry

* Fix documentation

* Apply suggestions from code review

Co-Authored-By: Thomas J Fan <thomasjpfan@gmail.com>

* Add suggested changes

* Update test_sparse_pca.py

Co-authored-by: Mateusz Górski <mateuszg122@gmail.com>
Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
viclafargue pushed a commit to viclafargue/scikit-learn that referenced this pull request Jun 26, 2020
…earn#16981)

* Add n_components_ attribute to SparcePCA and MiniBatchSparsePCA

* Add n_components_ attribute to SparcePCA and MiniBatchSparsePCA

* Add whatsnew entry

* Fix documentation

* Apply suggestions from code review

Co-Authored-By: Thomas J Fan <thomasjpfan@gmail.com>

* Add suggested changes

* Update test_sparse_pca.py

Co-authored-by: Mateusz Górski <mateuszg122@gmail.com>
Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
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.

4 participants