set.seed(1)
x <- as.matrix(iris[, -5])
# fit three methods (kmeans, bootstrap kmeans, fuzzy \eqn{c}-means)
res <- compare.clusters(x, groups = 3, nstart = 10, what = "all")
# compare contigency tables
compare.tables(res, true.labs = iris$Species)
Run the code above in your browser using DataLab