IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
fisher_ld.m File Reference

Detailed Description

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]:

S_B*w = lambda*S_W*w

There are rank(S_B) (at most no_classes-1) different w's.

References:

[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.

See also
calculate_scatters.m
Parameters
dataDataset
flag_sphere=0.Deac
flag_modified_s_bsee calculate_scatters.m
n_maxMaximum number of loadings vectors to be returned
Returns
[W_star] or [W_star, lambdas]

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 Documentation

function fisher_ld ( in  data,
in  flag_sphere,
in  flag_modified_s_b,
in  P,
in  n_max 
)