pavlin-policar / openTSNE

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

Better support for large late exaggeration #218

Closed dkobak closed 1 year ago

dkobak commented 1 year ago

I am often using exaggeration argument of TSNE(). It works flawlessly when the argument is less than 12:

TSNE(exaggeration=4).fit(X)

But if I want to use a value above 12, e.g. 24 (this rarely happens but I ran into this situation just now), then I am doing smth like this:

TSNE(exaggeration=24, early_exaggeration=24, learning_rate = X.shape[0]/24).fit(X)

which is a little annoying, and cumbersome to communicate to practitioners who are less familiar with inner working of t-SNE. I would love to be able to simply run

TSNE(exaggeration=24).fit(X)

I am wondering if we can somehow change the default behaviour, so that this works by default. For example, we could have early_exaggeration='auto' by default, so that auto defaults to 12 unless exaggeration is above 12. And set the "auto" learning rate accordingly. This is admittedly an edge use case... But I don't really see downsides. What do you think?

pavlin-policar commented 1 year ago

I see, yes, this makes sense. I think the "auto" route is the way to go. It is an unusual use-case, but I don't really see any downside to this approach.