3 %>@brief Calculates scatter matrices from dataset
7 %> @param data @ref
irdata object
8 %> @param flag_modified_s_b
if 1, S_B will be calculated in an alternative way which is
class terms will not be weighet by class sample size, which
9 %> will cause all classes to have equal importance.
10 %> @param P penalty matrix to be added to @c S_W
11 %> @return <em>[S_B, S_W]</em> Respectively
"inter-class scatter matrix" and
"within-class scatter matrix"
14 if ~exist('flag_modified_s_b', 'var')
15 flag_modified_s_b = 0;
function calculate_scatters(in X, in classes, in flag_modified_s_b, in P)
function data_calculate_scatters(in data, in flag_modified_s_b, in P)