Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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
)

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.

Value

The optimal number of cluster of the K-means clustering method according to the chosen criterion.

See Also

Examples

require (datasets)
data (iris)
kmeans.getk (iris [, -5])

fdm2id

Data Mining and R Programming for Beginners

v0.9.5
GPL-3
Authors
Alexandre Blansché [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.