Last chance! 50% off unlimited learning
Sale ends in
Run K-means for clustering.
KMEANS(
d,
k = 9,
criterion = c("none", "pseudo-F"),
graph = FALSE,
nstart = 10,
...
)
The clustering (kmeans
object).
The dataset (matrix
or data.frame
).
The number of cluster.
The criterion for cluster number selection. If none
, k
is used, if not the number of cluster is selected between 2 and k
.
A logical indicating whether or not a graphic should be plotted (cluster number selection).
Define how many random sets should be chosen.
Other parameters.
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
Run the code above in your browser using DataLab