TheAlgorithms / TheAlgorithms/Python

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

Open
#13,513 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
225k
Forks
51.1k
Avg merge
1d 23h
Merged PRs (30d)
156

Description

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!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading t_stochastic_neighbour_embedding.py and the current TSNE usage. Review the proposed visualization, reproducibility, parameter, and import-handling changes, then confirm which suggestions are in scope. Done means the selected improvements are implemented while the script continues to run as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python, scikit-learn
Domain
data-visualization, machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.