KMEANS | R Documentation |
Run K-means for clustering.
KMEANS(
d,
k = 9,
criterion = c("none", "pseudo-F"),
graph = FALSE,
nstart = 10,
...
)
d |
The dataset ( |
k |
The number of cluster. |
criterion |
The criterion for cluster number selection. If |
graph |
A logical indicating whether or not a graphic should be plotted (cluster number selection). |
nstart |
Define how many random sets should be chosen. |
... |
Other parameters. |
The clustering (kmeans
object).
kmeans
, predict.kmeans
require (datasets)
data (iris)
KMEANS (iris [, -5], k = 3)
KMEANS (iris [, -5], criterion = "pseudo-F") # With automatic detection of the nmber of clusters
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.