pavlin-policar / openTSNE

Extensible, parallel implementations of t-SNE
https://opentsne.rtfd.io
BSD 3-Clause "New" or "Revised" License
1.44k stars 158 forks source link

Change default affinity model to multiscale #206

Closed pavlin-policar closed 2 years ago

pavlin-policar commented 2 years ago
Issue

It is annoying to have to use Multiscale affinities, because we have to instantiate a separate Multiscale class.

Description of changes

By default, we used PerplexityBasedNN, which -- under the hood -- just converted the perplexity to single-element list and called the same underlying machinery that MultiscaleMixture did. In this PR, I change the default perplexity model to MultiscaleMixture, which allows calls like

tsne = TSNE(perplexity=[50, 500])
# or
embedding.transform(x_new, perplexity=[10, 50])

This doesn't have any breaking changes and will produce the same results as before, but will be more flexible.

The parameter naming is a bit annoying/confusing. Currently, I've made it so that both the TSNE() constructor and transform both only accept perplexity and not perplexities.

Extra
Includes