Learn R Programming

ockc (version 1.1)

bootockc: Bootstrap Order Constrained k-means Clustering

Description

Runs ockc for different numbers of clusters on bootstrap replica of the original data (maintaining the supplied order) and returns corresponding cluster assignments, centroids and Rand indices comparing pairs of partitions.

Usage

bootockc(x, k, nboot = 100, order = NULL, correct = TRUE, seed = NULL,
         multicore = TRUE, verbose = FALSE, ...)

Value

Returns an object of class "bootFlexclust".

Arguments

x, k, ...

Passed to ockc

nboot

Number of bootstrap pairs (maintaining order).

order

Order restriction of x. If NULL an initial run of ockc with order=NULL is run to calculate an order with seriate from package seriation

correct

Logical, correct the index for agreement by chance?

seed

If not NULL, a call to set.seed() is made before any clustering is done.

multicore

Use parallelization, if available. For examples and additional documentation see bootFlexclust.

verbose

Logical, show progress information during computations. Ignored if multicore=TRUE.

Author

Sebastian Krey

See Also

ockc, bootFlexclust, stepFlexclust

Examples

Run this code
x <- rbind(cbind(rnorm(10, mean=0), rnorm(10, mean=0,), rnorm(10, mean=0)),
           cbind(rnorm(10, mean=10), rnorm(10, mean=10), rnorm(10, mean=0)),
           cbind(rnorm(10, mean=10), rnorm(10, mean=0), rnorm(10, mean=10)),
           cbind(rnorm(10, mean=10), rnorm(10, mean=10), rnorm(10, mean=10))
           )

bockc <- bootockc(x, 2:4, nboot=4, order=c(1:10, 21:40, 11:20),
                  multicore=FALSE, verbose=FALSE)
bockc

Run the code above in your browser using DataLab