Learn R Programming

flexclust (version 1.1-0)

bootFlexclust: Bootstrap Flexclust Algorithms

Description

Runs clustering algorithms repeatedly for different numbers of clusters on bootstrap replica of the original data and returns corresponding cluster assignments, centroids and Rand indices comparing pairs of partitions.

Usage

bootFlexclust(x, k, nboot=100, verbose=TRUE, correct=TRUE, ...)

## S3 method for class 'bootFlexclust,missing': plot(x, y, ...) ## S3 method for class 'bootFlexclust': boxplot(x, ...) ## S3 method for class 'bootFlexclust': densityplot(x, data, ...)

Arguments

x, k, ...
Passed to stepFlexclust.
nboot
Number of bootstrap pairs of partitions.
verbose
If TRUE, show progress information during computations.
correct
Logical, correct the index for agreement by chance?
y, data
Not used.

See Also

stepFlexclust

Examples

Run this code
## data uniform on unit square
x <- matrix(runif(400), ncol=2)

bcl <- bootFlexclust(x, k=2:7, nboot=20, FUN=cclust)

bcl
summary(bcl)

## splitting the square into four quadrants should be the most stable
## solution (increase nboot if not)
plot(bcl)
densityplot(bcl, from=0)

Run the code above in your browser using DataLab