Skip to content

t-distributed Stochastic Neighbor Embedding#4003

Draft
ranjodhsingh1729 wants to merge 29 commits into
mlpack:masterfrom
ranjodhsingh1729:tsne
Draft

t-distributed Stochastic Neighbor Embedding#4003
ranjodhsingh1729 wants to merge 29 commits into
mlpack:masterfrom
ranjodhsingh1729:tsne

Conversation

@ranjodhsingh1729

@ranjodhsingh1729 ranjodhsingh1729 commented Sep 6, 2025

Copy link
Copy Markdown
Contributor

Closes: #3962

@ranjodhsingh1729 ranjodhsingh1729 marked this pull request as draft September 6, 2025 09:12
@conradsnicta conradsnicta mentioned this pull request Sep 7, 2025
@ranjodhsingh1729

Copy link
Copy Markdown
Contributor Author

Hi @rcurtin!

While most of the basic work is done, There are some performance issues in repulsive force calculation. I am currently working on it but any ideas are more than welcome. That aside, if you could take a quick look on the overall implementation whenever you have the time that would be great.

@rcurtin

rcurtin commented Feb 19, 2026

Copy link
Copy Markdown
Member

Hey @ranjodhsingh1729, sorry it has taken so long to get back to this. I was planning to take the time to review this either this week or next; is it ready for review, or did you have anything else you wanted to do to it first? Sorry again this whole process has taken so long.

@ranjodhsingh1729

Copy link
Copy Markdown
Contributor Author

Hi @rcurtin

You're right! There are few things i wanted to address before merging (been putting them on hold for a while):

  • ExactTSNE Method currently operates on symmetric matrices and does twice the necessary work. It want to rewrite it using only the triangular part of the pairwise distance matrix; I haven't thought about how to do that exactly.

  • Repulsive force calculation in BarnesHutTSNE Method takes more time than expected. I don't know exactly what part is to blame for that. (recently learned about perf, thinking about using it generate some cool flamegraphs :)

  • The final error is slightly above what i get from other implementations. I'm quite sure its not a correctness issue as i compared the gradients with scikits and they were only off at about 10-12th decimal place. I think rewriting some of the expressions in some other way may help reduce the rounding errors.

I know that the work is not yet in the state I originally intended for review. Still
Iff you have the time, I would really appreciate any early feedback on issues that are obvious to you.

I'll try to complete the above as soon as i'm able to. Also will try to make sure it doesn't take more than a few back and forths to get this merged.

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.

t-SNE support

2 participants