![]() |
IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
|
Calculates Fisher's Linear Discriminant vectors (loadings).
If either data or pieces is passed, the scatter matrixes will be calculated.
The rank of S_W
(within-class scatter matrix) will be tested, and if it is lower than the dimensionality of the problem (i.e., number of features), PCA will be run first to project the data onto a space where the within-class scatter matrix (say S_W_PCA
) will be non-singular and then the obtained LDA loadings will be projected back to the original space.
The equation to solve [1]:
There are rank(S_B) (at most no_classes-1) different w's.
[1] R. O. Duda, P. E. Hart, and D. G. Stork, Pattern Classification, 2nd ed. New York: John Wiley & Sons, 2001.
[2] T. Hastie, J. H. Friedman, and R. Tibshirani, The Elements of Statistical Learning, 2nd ed. New York: Springer, 2007.
data | Dataset |
flag_sphere=0. | Deac |
flag_modified_s_b | see calculate_scatters.m |
n_max | Maximum number of loadings vectors to be returned |
Definition in file fisher_ld.m.
Go to the source code of this file.
Functions | |
function | fisher_ld (in data, in flag_sphere, in flag_modified_s_b, in P, in n_max) |
function fisher_ld | ( | in | data, |
in | flag_sphere, | ||
in | flag_modified_s_b, | ||
in | P, | ||
in | n_max | ||
) |