-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC Add links to decomposition examples in docstrings and user guide #26932
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
Conversation
Having too many examples in the same PR makes it hard to review, could you please reduce this to PCA only? |
Linked examples are now limited to PCA only. Examples included are:
|
doc/modules/decomposition.rst
Outdated
@@ -53,6 +53,8 @@ data based on the amount of variance it explains. As such it implements a | |||
|
|||
.. topic:: Examples: | |||
|
|||
* :ref:`sphx_glr_auto_examples_decomposition_plot_pca_3d.py` |
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.
@glemaitre should we remove this? or merge it with plot_pca_iris
?
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.
ping @glemaitre
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.
Indeed. This example is not super compiling as-is. I assume that we could do something similar on the iris dataset.
At the end, I am not a big fan of the 3d visualization. I think that having several 2-d visualization will be more helpful.
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.
@mmhamdy do you need help removing this example? You can do git rm path/to/file
to remove a file from the repo. And then remove all mentions of it from the codebase.
For an examples of usage see: | ||
- :ref:`sphx_glr_auto_examples_decomposition_plot_incremental_pca.py` |
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.
This example needs some improvements.
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.
Like a more informative description?
sklearn/decomposition/_pca.py
Outdated
For examples of usage see: | ||
- :ref:`sphx_glr_auto_examples_decomposition_plot_pca_iris.py` | ||
- :ref:`sphx_glr_auto_examples_decomposition_plot_pca_3d.py` | ||
- :ref:`sphx_glr_auto_examples_decomposition_plot_pca_vs_lda.py` | ||
- :ref:`sphx_glr_auto_examples_decomposition_plot_pca_vs_fa_model_selection.py` |
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.
I think we should choose one really, instead of listing them all.
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.
In this case, I think plot_pca_iris.py is a good and simple one.
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.
PCA on iris would make sense. I think that we could improve this example greatly and merging with others.
sklearn/decomposition/_sparse_pca.py
Outdated
For an example of usage see: | ||
- :ref:`sphx_glr_auto_examples_decomposition_plot_faces_decomposition.py` |
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.
This example is a good comparison between methods, not a usage example.
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.
That's right. I can change "example of usage" to "example comparing sparse PCA to PCA"
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Hello @adrinjalali, so sorry for the delayed response. I've removed the 3d example and addressed the other comments. |
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.
I'm happy with this as is, and do other improvements in other PRs. WDYT @glemaitre
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. In order to avoid a 404 in the future, I made a redirection on the example that we removed. I also fixes a couple of rendering and typo issue.
Actually we should fix the |
Enabling auto-merge after checking the artefacts. |
…cikit-learn#26932) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com> Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
…26932) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com> Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
…cikit-learn#26932) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com> Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Reference Issues/PRs
What does this implement/fix? Explain your changes.
PR to add links to the examples mentioned in issue 26927 for the decomposition section. Links to examples were added to the user guide and API docs of the decomposition section:
examples/decomposition:
other examples that are related to decomposition but found in different sections that were linked here:
examples/applications:
examples/compose:
examples/release_highlights: