6
$\begingroup$
  • According to wiki it is recommenced to use T-SNE to map to 2-3 dimensional.
  • I can understand this , if we want to visualizing the data.
  • If we want to reduce the number of features (i.e from 30 features to 5 dims), is it recommended to do this with T-SNE ? or we should use other dimensional reduction algorithm ?
$\endgroup$
9
$\begingroup$

Big Alarm!

T-SNE is NOT a dimensionality reduction algorithm (like PCA, LLE, UMAP, etc.). It is ONLY for visualization, and for that sake, more than 3 dimensions does not make sense.

T-SNE is not a parametric method so you do not get abase vector representation based on which you reduce dimensionality of a new dataset (validation, test). Thats why it can not be used for dimensionality reduction.

It is calculated stochastically only based on the data it sees, so if you use it on the train set, there is no way to do the same calculation for your test set thus no modeling with T-SNE.

If you see Sklearn functions, for PCA and other dimensionality algorithms you see both fit(), transform() and fit_transform() functions but for T-SNE you have only fit() and fit_transform() because you will have no model to only transform() a new dataset.

I tried to be intuitive. If you need more technical explanation just drop a comment.

$\endgroup$
4
  • $\begingroup$ Thanks. Can we use PCA or UMAP (for example) which are dimensional reduction alg to reduce the features to 2 or 3 dims and used those dims for visualization ? (Instead of TSNE) ? What is the advantage of using TSNE for visualization and not other ? $\endgroup$
    – Boom
    Jun 22 at 9:09
  • $\begingroup$ Actually there is no advantage! UMAP replaced T-SNE while ago. The reason you see T-SNE in some softwares is that UMAP is pretty new (2018 it was introduced as far as i remember). UMAP beats T-SNE in all mutual functunalities and it offers modeling which T-SNE does not. Google "T-SNE is dead" and if it convinced you, accept my answer ;) $\endgroup$ Jun 22 at 9:14
  • 1
    $\begingroup$ That's at least partially FUD, see biorxiv.org/content/10.1101/2019.12.19.877522v1 $\endgroup$ Jun 22 at 21:17
  • $\begingroup$ nice article but still alligned with my comment i think, right? still UMAP offers feature extraction and TSNE does not and that is a very big deal. $\endgroup$ Jun 23 at 7:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.