Distance: Distance matrix. For n data points of the dimension n x n
ClusterNo: A number k which defines k different clusters to be built by the algorithm.
Centers: Default(NULL) a set of initial (distinct) cluster centres.
RandomNo: If>1: Number of random initializations with searching for minimal SSE is defined by this scalar
maxIt: Optional: Maximum number of iterations before the algorithm terminates.
PlotIt: Default: FALSE, If TRUE plots the first three dimensions of the dataset with colored three-dimensional data points defined by the clustering stored in Cls
verbose: Optional: Algorithm always outputs current iteration.
Returns
Cls[1:n]: [1:n] numerical vector with n numbers defining the classification as the main output of the clustering algorithm. It has k unique numbers representing the arbitrary labels of the clustering.
centerids[1:k]: Indices of the centroids from which the cluster Cls was created
Author(s)
Felix Pape, Michael Thrun
Note
Currently an experimental version
Examples
data('Hepta')#out=kmeansDist(as.matrix(dist(Hepta$Data)),ClusterNo=7,PlotIt=FALSE,RandomNo = 10)## Not run:data('Leukemia')#as expected does not perform well#for non-spherical cluster structures:#out=kmeansDist(Leukemia$DistanceMatrix,ClusterNo=6,PlotIt=TRUE,RandomNo=10)## End(Not run)