The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information.... |
Home MathPack Math2 Procedures and Functions ClassScatterMatrices | |||||||
See also: CalcCovar | |||||||
ClassScatterMatrices |
|||||||
The function ClassScatterMatrices calculates the between-class and within-class scatter matrices. The parameter InData contains the data to be analyzed (rows are objects, columns are variables) and the parameter ClassVec contains the corresponding class numbers. On return, the variable parameter NClasses contains the number of found classes. The variable arrays ClCnt, ClMeans and ClVars contain the number of members of each class, the class means and the class variances, respectively. The first index of the arrays ClMeans and ClVars designates the corresponding variable, the second index addresses the class number (zero-based indices!). For example, the element ClVars[3,0] contains the variance of the fourth variable for the first class. The between-class and within-class scatter matrices are returned in the variable parameters SBetwCl and SWithinCl. The scatter matrices Sb and Sw are calculated according to the following equations. Please note that the scatter matrices are not scaled to the number of data points (which is sometimes the case in other implementations):
C ... number of classes The function returns the following error codes: 0 ... everything is OK
|