1
$\begingroup$

I wanted to know if I can use t-sne or PCA to reduce the number of classes depending on the similarity between them. For example, if I have 100 classes of 100 different animals and would like to put all the cats in a group and all the dogs in a group etc. (to get few groups of these 100 classes).

$\endgroup$

2 Answers 2

5
$\begingroup$

No. t-Distributed Stochastic Neighbor Embedding (t-SNE) and Principal Component Analysis (PCA) are dimension reduction techniques, aka fewer columns of a tidy dataframe.

Clustering will reduce the number of observations, aka fewer rows of a tidy dataframe. In particular, you might be looking for hierarchical clustering.

$\endgroup$
1
  • $\begingroup$ Thank you, I'll look for it $\endgroup$ Mar 15, 2020 at 18:30
2
$\begingroup$

If you want to reduce the number of classes you are predicting over, then you could manually map them to a simpler set (i.e. map poodle, greyhound to dog ) OR if you don't have the domain knowledge you can cluster your data and predict the cluster instead of their original labels.

You could use PCA or t-SNE to reduce the number of dimensions before clustering. This is best practice if you have many features (~>100) as you will often run into the curse of high dimensionality.

$\endgroup$
2
  • $\begingroup$ Yes, and in case of face recognition? Can i map them to skin color or race ? For example asian euroean and African? $\endgroup$ Mar 15, 2020 at 18:31
  • $\begingroup$ It is not typically used like this (see other comments), BUT you could use TSNE/UMAP/PCA + Clustering to make a more informed decision on how to map your labels to a simpler set. $\endgroup$ Sep 1, 2020 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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