The \(K\)--means algorithm with cluster indices computed.
cikmeans(y, ncl = 10, trim = 0, max.iters = 50, nstart = 10, all = FALSE)A list inclusing:
A matrix with 9 columns and at least one row, where each column contains the value of a cluster validity index, whose minimal vlaue is preferred. Each row corresponds to a specific number of clusters, starting from 2 up to ncl.
The number of clusters selected based upon the minimal valued cluster validity indices.
A matrix with 24 columns and at least one row, where each column contains the value of a cluster validity index, whose minimal vlaue is preferred. Each row corresponds to a specific number of clusters, starting from 2 up to ncl.
The number of clusters selected based upon the maximal valued cluster validity indices.
If the argument "all" is TRUE, then the clustering indices of each observation for each number of clusters will be returned in a matrix, where each column corresponds to the clustering of each number of clusters.
A matrix with numerical data.
The maximum number of clusters to try. The minimum number of clusters is 2.
A number in [0, 1). If trim = 0, then the classical \(K\)--means algorithm is performed. If you chose a number higher than 0 then the trimmed \(K\)--means of Garcia-Escudero et al. (2008) is performed.
The maximum number of iterations allowed during the \(K\)--means algortihm.
How many random starts to perform?
If this is TRUE, then the clustering indices of each observation for each number of clusters will be returned.
Michail Tsagris and Nikolaos Kontemeniotis.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Nikolaos Kontemeniotis kontemeniotisn@gmail.com. .
The \(K\)--means algorithm is performed and a series of cluster validity indices are computed.
Garcia-Escudero Luis A., Gordaliza Alfonso, Matran Carlos, Mayo-Iscar Agustin. (2008). A general trimming approach to robust cluster analysis. Annals of Statistics 36(3): 1324--1345.
index_min, index_max, alfa.cikmeans
y <- as.matrix(iris[, 1:4])
y <- y / rowSums(y)
mod <- cikmeans(y, ncl = 5)
Run the code above in your browser using DataLab