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

Detailed Description

Calculates scatter matrices from dataset.

See also
calculate_scatters.m

Definition in file data_calculate_scatters.m.

Go to the source code of this file.

Functions

function data_calculate_scatters (in data, in flag_modified_s_b, in P)
 

Function Documentation

function data_calculate_scatters ( in  data,
in  flag_modified_s_b,
in  P 
)
Parameters
datairdata object
flag_modified_s_bif 1, S_B will be calculated in an alternative way which is class terms will not be weighet by class sample size, which will cause all classes to have equal importance.
Ppenalty matrix to be added to S_W
Returns
[S_B, S_W] Respectively "inter-class scatter matrix" and "within-class scatter matrix"