FindNumberK {RclusTool} | R Documentation |
Automatic estimation of the number of clusters
Description
Compute gap on a similarity matrix obtained from raw data matrix to estimate the number of clusters automatically.
Usage
FindNumberK(features, Kmax, StopCriteria = 0.99, graph = FALSE)
Arguments
features |
matrix of raw data (point by line). |
Kmax |
maximum number of clusters. |
StopCriteria |
elbow method cumulative explained variance > criteria to stop K-search. |
graph |
boolean: if TRUE, figures for total of within-class inertia and explained variance are plotted. |
Details
FindNumberK return K number according spectral gap on reduced points
Value
K number of clusters obtained.
Examples
dat <- rbind(matrix(rnorm(100, mean = 0, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 2, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 4, sd = 0.3), ncol = 2))
res <- FindNumberK(dat, Kmax=20, graph=TRUE)
[Package RclusTool version 0.91.6 Index]