Learn R Programming

mdir (version 0.9.0)

compileConsensusClustering: Compile Consensus Clustering

Description

Performs consensus clustering on a list of MCMC chains from ``runMCMCChains``.

Usage

compileConsensusClustering(
  mcmc_lst,
  D = NULL,
  W = NULL,
  point_estimate_method = "mean",
  construct_cm = TRUE,
  ...
)

Value

A named list similar to the output of ``runMCMCChains``.

Arguments

mcmc_lst

Output of ``runMCMCChains``.

D

The iteration to use from within the chains. Defaults to the largest possible value, i.e., the length of the chains.

W

The number of chains to use in compiling the consensus clustring. Defaults to the length of ``mcmc_lst`` but can be smaller.

point_estimate_method

Point estimate method for allocation probabilities in semi-supervised views. One of "median" or "mean".

construct_cm

Logical indicating if the consensus matrix should be constructed.

...

Arguments passed to ``salso::salso`` for inferring a point estimate in unsupervised views.

Examples

Run this code
# \donttest{
N <- 500
K <- 4
P <- 10

X <- generateSimulationDataset(K, N, P)
Y <- generateSimulationDataset(K, N, P)
Z <- generateSimulationDataset(K, N, P)

row.names(Z$data) <- row.names(Y$data) <- row.names(X$data)

data_modelled <- list(X$data, Y$data, Z$data)
V <- length(data_modelled)

# This R is much too low for real applications
R <- 1000
thin <- 100

K_max <- 50
K <- rep(K_max, V)

types <- rep("G", V)

n_chains <- 500
mcmc_lst <- runMCMCChains(data_modelled, n_chains, R, thin, types, K = K)
cc <- compileConsensusClustering(mcmc_lst)
# }

Run the code above in your browser using DataLab