I have a set of 500 points in 5D. Each point belongs to one of five classes, and the class labels are known.
I’d like to visualise the dataset in 2D such that the classes would be separated as much as possible.
I am currently using PCA and doing a scatterplot of the first two principal components. This works quite well for some datasets, but not as well for others. This makes intuitive sense, since PCA maximises explained variance rather than separability.
Are there any known methods for finding a 2D projection that would maximise separability? I don’t have any specific measure in mind and am open to suggestions.
[r] as I'd love to see some R code or pointers.)