0
$\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$
4
$\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.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you, I'll look for it $\endgroup$ – Mustafa Azzurri Mar 15 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.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Yes, and in case of face recognition? Can i map them to skin color or race ? For example asian euroean and African? $\endgroup$ – Mustafa Azzurri Mar 15 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$ – Michael Higgins Sep 1 at 21:37

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.