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
[MRG] Add Swiss-Hole dataset and expand example #21482
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.
Looks good to me, once a new test is added to cover the new option.
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.
Cool addition !
A few minor comments:
Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org>
Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org>
pull upstream from main to pass validation tests
@TomDLT thanks for your detailed review. I've incorporated them to the PR. Let me know if there's anything else you need me to do. |
Thanks @pujaltes ! |
* added hole to swiss roll and expanded example * Fixed docstring for numpydoc validation * Changed error from original docstring. * Added test for swiss hole Codecov check was failing because there was no test for the addition of the swisshole. I simply expanded the original test to include it. * Formatting * Revert "Formatting" This reverts commit 727505b. * Revert "Added test for swiss hole" This reverts commit ae78864. * Added test for Swiss Hole * fixed test * added changelog * Set random state when creating the swiss roll in exampple. * Set random state when creating the swiss hole in exampple. * Changed test with reccommendation * Apply suggestions from code review of plots. Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org> * Apply grammar and naming suggestions from code review Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org> * Defined LLE and t-SNE acronyms at beginning * Linting Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org>
* added hole to swiss roll and expanded example * Fixed docstring for numpydoc validation * Changed error from original docstring. * Added test for swiss hole Codecov check was failing because there was no test for the addition of the swisshole. I simply expanded the original test to include it. * Formatting * Revert "Formatting" This reverts commit 727505b. * Revert "Added test for swiss hole" This reverts commit ae78864. * Added test for Swiss Hole * fixed test * added changelog * Set random state when creating the swiss roll in exampple. * Set random state when creating the swiss hole in exampple. * Changed test with reccommendation * Apply suggestions from code review of plots. Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org> * Apply grammar and naming suggestions from code review Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org> * Defined LLE and t-SNE acronyms at beginning * Linting Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org>
* added hole to swiss roll and expanded example * Fixed docstring for numpydoc validation * Changed error from original docstring. * Added test for swiss hole Codecov check was failing because there was no test for the addition of the swisshole. I simply expanded the original test to include it. * Formatting * Revert "Formatting" This reverts commit 727505b. * Revert "Added test for swiss hole" This reverts commit ae78864. * Added test for Swiss Hole * fixed test * added changelog * Set random state when creating the swiss roll in exampple. * Set random state when creating the swiss hole in exampple. * Changed test with reccommendation * Apply suggestions from code review of plots. Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org> * Apply grammar and naming suggestions from code review Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org> * Defined LLE and t-SNE acronyms at beginning * Linting Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org>
* added hole to swiss roll and expanded example * Fixed docstring for numpydoc validation * Changed error from original docstring. * Added test for swiss hole Codecov check was failing because there was no test for the addition of the swisshole. I simply expanded the original test to include it. * Formatting * Revert "Formatting" This reverts commit 727505b. * Revert "Added test for swiss hole" This reverts commit ae78864. * Added test for Swiss Hole * fixed test * added changelog * Set random state when creating the swiss roll in exampple. * Set random state when creating the swiss hole in exampple. * Changed test with reccommendation * Apply suggestions from code review of plots. Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org> * Apply grammar and naming suggestions from code review Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org> * Defined LLE and t-SNE acronyms at beginning * Linting Co-authored-by: Tom Dupré la Tour <tom.dupre-la-tour@m4x.org>
Reference Issues/PRs
I had previously worked on this in #20950. As discussed with @ogrisel I also expanded and modernised the plot_swisroll example. However, after some errors by my part, I wasn't able to reconcile the conflicts with the main branch which is why I'm creating this new PR. I hope it doesn't seem spammy.
What does this implement/fix? Explain your changes.
This expands the swiss roll generator by adding the option to have a hole in the swiss roll. The swiss hole dataset appears in many articles (see [1] [2]) and is useful in studying the robustness of non-linear dimensionality reduction algorithms (NLDA) in preserving topological structures.
Furthermore, I expanded the plot_swissroll.py by adding a second part where I analyzed how NLDA's dealt with the hole. I also repreated all the analysis with t-sne to have a comparison to LLE.