ChooseK: Choose the Number of Clusters K for (Sparse) Weighted K-Means...

Description Usage Arguments Value Methods (by generic) Author(s) References See Also

View source: R/ChooseK.R

Description

The number of clusters K should be determined before the clustering method is performed. A permutation approach using Gap Statistic is used.

Usage

1
2
3
4
ChooseK(x, nClusters = 2:6, nperms = 20, nstart = 20)

## S3 method for class 'ChooseK'
plot(x, ...)

Arguments

x

An n by p numeric data matrix, and n is the number of observations and p the number of features.

nClusters

a candidate sequence of K. Default is 2:6.

nperms

Number of permutations. Default is 20.

nstart

The number of initial random sets chosen from (distinct) rows in x. Omitted if centers is provided. Default is 20.

...

unused.

Value

The function returns a list of the following components:

OptimalK

The optimal number of clusters chosen from nClusters.

plotinfo

A list containing the information needed in S3 method plot.

Methods (by generic)

Author(s)

Wenyu Zhang

References

Robert, T. et al. (2001). Estimating the number of clusters in a data set via the gap statistic. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 63(2), 411-423.

See Also

Other sparse weighted K-Means functions: KMeansSparseCluster.permute.weight, KMeansSparseCluster.weight, kmeans.weight.tune, kmeans.weight


Van1yu3/SWKM documentation built on Sept. 3, 2019, 7:50 a.m.