Skip to content

Feedback on t-SNE script: ideas to improve clarity and usability #13513

@wiroking

Description

@wiroking

Feature description

Hi! I tested your t_stochastic_neighbour_embedding.py script on my local setup and it runs well thanks for sharing it!

I have a few suggestions that might improve clarity and usability for others:

Visualization: Consider adding a matplotlib scatter plot to show the t-SNE result. It helps users see the clustering visually.

Reproducibility: Adding random_state=42 to the TSNE() constructor would make the output consistent across runs.

Parameter transparency: Explicitly setting perplexity, learning_rate, and n_iter could help learners understand how t-SNE behaves.

Import error handling: A simple try/except block for sklearn imports could guide users if they haven't installed the package.

Let me know if you'd like help implementing any of these — happy to collaborate!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis PR modified some existing files

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions