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....



kMeansClustering


Unit:SDL_math2
Class:none
Declaration:procedure kMeansClustering (InMat: TMatrix; RowLo, RowHi: integer; NumClusters: integer; var Clusters: TMatrix; var ClassVec: TIntVector);

The procedure kMeansClustering performs a cluster analysis using the well-known k-means algorithm (see www.statistics4u.info for more details).

The parameter InMat contains the data to be clustered (the rows contain the objects, the columns contain the variables). The objects actually used for the clustering are determined by the parameters RowLo and RowHi. The parameter NumClusters specifies the number of clusters to be found.

The detected cluster centers are stored in the variable parameter Clusters, the class assignment of the objects is returned in the variable parameter ClassVec (a vector of length InMat.NrOfRows).

kMeansClustering increments the global variable ProcStat and calls the feedback routine MathFeedBackProc in order to allow feedback to the user during time consuming calculations.



Last Update: 2007-Mai-19