cleanUp_partition {doMIsaul}R Documentation

Remove small clusters (i.e. unclassified observations for which no consensus was obtained)

Description

Remove small clusters (i.e. unclassified observations for which no consensus was obtained)

Usage

cleanUp_partition(
  partition,
  min.cluster.size = 10,
  level.order = NULL,
  Unclassified = c(NA, "Unclassified")
)

Arguments

partition

the partition to clean (vector).

min.cluster.size

Minimum cluster size (i.e., smaller clusters will be discarded)

level.order

optional. If you supply a variable the cluster levels will be ordinated according to the mean values for the variable

Unclassified

string for the label of the unclassified observations. defaults value is NA.

Value

The cleaned up partition (factor).

Examples

part <- factor(kmeans(iris[, 1:4], 8)$cluster)
summary(part)
part.clean <- cleanUp_partition(part, Unclassified = "Unclassified")

[Package doMIsaul version 1.0.1 Index]