kmeans.getk: Estimation of the number of clusters for K-means
Description
Estimate the optimal number of cluster of the K-means clustering method.
Usage
kmeans.getk(
d,
max = 9,
criterion = "pseudo-F",
graph = TRUE,
nstart = 10,
seed = NULL
)
Value
The optimal number of cluster of the K-means clustering method according to the chosen criterion.
Arguments
- d
The dataset (matrix
or data.frame
).
- max
The maximum number of clusters. Values from 2 to max
are evaluated.
- criterion
The criterion to be optimized. "pseudo-F"
is the only criterion implemented in the current version.
- graph
A logical indicating whether or not a graphic should be plotted.
- nstart
The number of random sets chosen for kmeans
initialization.
- seed
A specified seed for random number generation.
Examples
Run this coderequire (datasets)
data (iris)
kmeans.getk (iris [, -5])
Run the code above in your browser using DataLab