Learn R Programming

blockcluster (version 4.5.5)

cocluster: Co-Clustering function.

Description

This function performs Co-Clustering (simultaneous clustering of rows and columns ) for Binary, Contingency and Continuous data-sets using latent block models.It can also be used to perform semi-supervised co-clustering.

Usage

cocluster(
  data,
  datatype,
  semisupervised = FALSE,
  rowlabels = integer(0),
  collabels = integer(0),
  model = NULL,
  nbcocluster,
  strategy = coclusterStrategy(),
  nbCore = 1
)

Value

Return an object of BinaryOptions or ContingencyOptions

or ContinuousOptions depending on whether the data-type is Binary, Contingency or Continuous respectively.

Arguments

data

Input data as matrix (or list containing data matrix, numeric vector for row effects and numeric vector column effects in case of contingency data with known row and column effects.)

datatype

This is the type of data which can be "binary" , "contingency", "continuous" or "categorical".

semisupervised

Boolean value specifying whether to perform semi-supervised co-clustering or not. Make sure to provide row and/or column labels if specified value is true. The default value is false.

rowlabels

Integer Vector specifying the class of rows. The class number starts from zero. Provide -1 for unknown row class.

collabels

Integer Vector specifying the class of columns. The class number starts from zero. Provide -1 for unknown column class.

model

This is the name of model. The following models exists for various types of data:

ModelData-typeProportionsDispersion/Variance
pik_rhol_epsilonkl(Default)binaryunequalunequal
pik_rhol_epsilonbinaryunequalequal
pi_rho_epsilonklbinaryequalunequal
pi_rho_epsilonbinaryequalequal
pik_rhol_sigma2kl(Default)continuousunequalunequal
pik_rhol_sigmacontinuousunequalequal
pi_rho_sigma2klcontinuousequalunequal
pi_rho_sigma2continuousequalequal
pik_rhol_unknown(default)contingencyunequalN.A
pi_rho_unknowncontingencyequalN.A
pik_rhol_knowncontingencyunequalN.A
pi_rho_knowncontingencyequalN.A
pik_rhol_multicategoricalunequalunequal
pi_rho_multicategoricalequalunequal

nbcocluster

Integer vector specifying the number of row and column clusters respectively.

strategy

Object of class strategy.

nbCore

number of thread to use (OpenMP must be available), 0 for all cores. Default value is 1.

Examples

Run this code

# Simple example with simulated binary data
#load data
data(binarydata)
#usage of cocluster function in its most simplest form
out<-cocluster(binarydata,datatype="binary",nbcocluster=c(2,3))
#Summarize the output results
summary(out)
#Plot the original and Co-clustered data 
plot(out)

Run the code above in your browser using DataLab