Skip to content

DOC Rework TSNE demo on perplexity#33703

Open
ArturoAmorQ wants to merge 1 commit intoscikit-learn:mainfrom
ArturoAmorQ:tsne_perplexity
Open

DOC Rework TSNE demo on perplexity#33703
ArturoAmorQ wants to merge 1 commit intoscikit-learn:mainfrom
ArturoAmorQ:tsne_perplexity

Conversation

@ArturoAmorQ
Copy link
Copy Markdown
Member

@ArturoAmorQ ArturoAmorQ commented Apr 7, 2026

Reference Issues/PRs

None

What does this implement/fix? Explain your changes.

Related to the series of examples I've been reworking.
This PR refactors the t-SNE example to demo the effect of perplexity to:

  • use notebook style (see Fix notebook-style examples #22406);
  • reduce boilerplate;
  • add a plot to visually compare fit_transform time;
  • use the default "pca" initialization in TSNE instead of the "random" init;
  • use the same max_iter across datasets for a controlled comparison of fit_transform times.

AI usage disclosure

I used AI assistance for:

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Any other comments?

Because of the change in the initialization and max_iter, resulting plots are slightly different from the current state of the example, but now the TSNE results are deterministic without setting a random state.

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.

1 participant