Skip to content
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

Merged
merged 18 commits into from Nov 12, 2021

Conversation

pujaltes
Copy link
Contributor

@pujaltes pujaltes commented Oct 27, 2021

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.

Codecov check was failing because there was no test for the addition of the swisshole. I simply expanded the original test to include it.
This reverts commit 727505b.
@ogrisel
Copy link
Member

ogrisel commented Oct 28, 2021

Nice, thanks for the example update, the new figure looks great, for people lazy to click on the ci/circleci: doc artifact link:

image

Copy link
Member

@ogrisel ogrisel left a 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.

@pujaltes pujaltes changed the title Add Swiss-Hole dataset and expand example [MRG] Add Swiss-Hole dataset and expand example Oct 29, 2021
Copy link
Member

@TomDLT TomDLT left a 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:

examples/manifold/plot_swissroll.py Outdated Show resolved Hide resolved
examples/manifold/plot_swissroll.py Outdated Show resolved Hide resolved
examples/manifold/plot_swissroll.py Outdated Show resolved Hide resolved
examples/manifold/plot_swissroll.py Outdated Show resolved Hide resolved
examples/manifold/plot_swissroll.py Outdated Show resolved Hide resolved
examples/manifold/plot_swissroll.py Outdated Show resolved Hide resolved
examples/manifold/plot_swissroll.py Outdated Show resolved Hide resolved
examples/manifold/plot_swissroll.py Outdated Show resolved Hide resolved
examples/manifold/plot_swissroll.py Show resolved Hide resolved
examples/manifold/plot_swissroll.py Show resolved Hide resolved
pujaltes and others added 5 commits November 11, 2021 18:57
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
@pujaltes
Copy link
Contributor Author

@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.

@TomDLT TomDLT merged commit 5131284 into scikit-learn:main Nov 12, 2021
32 checks passed
@TomDLT
Copy link
Member

TomDLT commented Nov 12, 2021

Thanks @pujaltes !

glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Nov 22, 2021
* 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>
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Nov 29, 2021
* 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>
samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
* 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>
mathijs02 pushed a commit to mathijs02/scikit-learn that referenced this pull request Dec 27, 2022
* 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>
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.

None yet

5 participants