Is that correct that LDA/FDA can only generate 2 outputs as a dimensional reduction method?
Suppose I have 100 features, I want to reduce to 5 features. Is LDA/FDA not usable?
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.
Sign up to join this communityApplying LDA to data with $K$ classes allows you to project the data onto a $K-1$ dimensional surface in a way that separates the data by class. You cannot arbitrarily choose the number of "features" that the data gets transformed into.
2 classes, the output will be 1 dimensionality ( 2 – 1 =1 )
, likewise, if my original dataset has 5 classes, the output will be 4 dimensionality.
$\endgroup$
eigenvalues for dimensions > c−1 will be 0 or imaginary (where c is the classes).
$\endgroup$
in LDA/FDA
, the eigenvalues for dimensions > c−1 will be 0 or imaginary (where c is the classes).
That is why the output is “c-1” where “c” is the number of classes and the dimensionality of the data is n with “n>c”
$\endgroup$
Also, note that you need labels to perform LDA, which is not always available (or relevant). That's why PCA is usually preferred because it's class-agnostic.
The number of output dimensions in LDA is linked to the number of degrees of freedom in the dataset, which is linked to the number of classes $c$: eigenvalues above $c$ will be zero and bear no information (same as with PCA and explained variance).
2 classes/labels (c), 50 features/dimensions/attributes (d), 150 samples/instances (n)
. I want to compare PCA and LDA
. LDA only produce 1 feature
as output because c-1 = 2-1 =1
.
$\endgroup$
1 feature
from my 2 classes
of dataset.
$\endgroup$