The function MultiClassLDA performs a multiclass linear discriminant analysis (LDA). 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 (zerobased indices!). For example, the element ClVars[3,0] contains the variance of the fourth variable for the first class.
The optimum discrimination directions (=eigenvectors) are returned in the variable parameter DiscrimDirs, the corresponding eigenvalues (=information content) is returned in the array EigenVals. The eigenvectors are stored rowwise in the DiscrimDirs array and are sorted in decreasing eigenvalue order.
The function returns the following error codes:
0 ... everything is OK
1 ... lengths of InData and ClassVec do not match
2 ... the class vector contains invalid class numbers
3 ... the class vector does not contain contiguous class numbers (1..NClasses)
4 ... class matrix is not invertible
5 ... cannot perform eigenanalysis (singular system)
