I want to reduce the features of a dataset using PCA, LDA and MDS. But I want to preserve 95% variance as well.
I couldn't find a way to indicate desired variance in the formulas for the respective algorithms. One paragraph seems relevant in PCA's API (sklearn.decomposition.PCA) -
if n_components == ‘mle’, Minka’s MLE is used to guess the dimension if 0 < n_components < 1, select the number of components such that the amount of variance that needs to be explained is greater than the percentage specified by n_components
But how can n_components be equal to 'mle' and a fraction at the same time?
setting n_components='mle' reduced the features from 40 to 39, which is not helpful.