mlcc.reps {varclust}R Documentation

Multiple Latent Components Clustering - Subspace clustering assuming that the number of clusters is known

Description

For a fixed number of cluster function returns the best partition and basis for each subspace.

Usage

mlcc.reps(X, numb.clusters = 2, numb.runs = 30, stop.criterion = 1,
  max.iter = 30, initial.segmentations = NULL, max.dim = 4,
  scale = TRUE, numb.cores = NULL, estimate.dimensions = TRUE,
  flat.prior = FALSE, show.warnings = FALSE)

Arguments

X

A data frame or a matrix with only continuous variables.

numb.clusters

An integer, number of cluster.

numb.runs

An integer, number of runs of mlcc.kmeans algorithm with random initialization.

stop.criterion

An integer, if an iteration of mlcc.kmeans algorithm makes less changes in partitions than stop.criterion, mlcc.kmeans stops.

max.iter

max.iter An integer, maximum number of iterations of the loop in mlcc.kmeans algorithm.

initial.segmentations

A list of vectors, segmentations that user wants to be used as an initial segmentation in mlcc.kmeans algorithm.

max.dim

An integer, maximal dimension of subspaces.

scale

A boolean, if TRUE (value set by default) then variables in dataset are scaled to zero mean and unit variance.

numb.cores

An integer, number of cores to be used, by default all cores are used.

estimate.dimensions

A boolean, if TRUE (value set by default) subspaces dimensions are estimated.

flat.prior

A boolean, if TRUE then, instead of a prior that takes into account number of models for a given number of clusters, flat prior is used.

show.warnings

A boolean, if set to TRUE all warnings are displayed, default value is FALSE.

Details

In more detail, an algorithm mlcc.kmeans is run a numb.runs of times with random or custom initializations. The best partition is selected according to the BIC.

Value

A list consisting of

segmentation

a vector containing the partition of the variables

BIC

a numeric, value of the mBIC

basis

a list of matrices, the factors for each of the subspaces

Examples


sim.data <- data.simulation(n = 50, SNR = 1, K = 5, numb.vars = 50, max.dim = 3)
mlcc.res <- mlcc.reps(sim.data$X, numb.clusters = 5, numb.runs = 20, max.dim = 4, numb.cores = 1)
show.clusters(sim.data$X, mlcc.res$segmentation)


[Package varclust version 0.9.4 Index]