Home > lib > calculate_scatters.m

calculate_scatters

PURPOSE ^

[S_B, S_W] = calculate_scatters(data, flag_modified_s_b = 0, penalty=0)

SYNOPSIS ^

function [S_B, S_W] = calculate_scatters(data, flag_modified_s_b, P)

DESCRIPTION ^

 [S_B, S_W] = calculate_scatters(data, flag_modified_s_b = 0, penalty=0)
              calculate_scatters(pieces, flag_modified_s_b = 0, penalty=0)

 Input:
   data: structure with the following:
     .X: dataset with rows as observations and columns as features;
     .classes: column vector with corresponding classes (0-based)
   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
     will cause all classes to have equal importance.
   P: penalty matrix to be added to S_W

 Outputs:
  - S_W: "within-class scatter matrix"
  - S_B: "inter-class scatter matrix"

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Thu 18-Feb-2010 12:47:47 by m2html © 2003