coclusterContingency: Co-Clustering function.

View source: R/coclusterContingency.R

coclusterContingencyR Documentation

Co-Clustering function.

Description

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

Usage

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

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.)

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 Poisson data:

pik_rhol_unknown(default) contingency unequal N.A
pi_rho_unknown contingency equal N.A
pik_rhol_known contingency unequal N.A
pi_rho_known contingency equal N.A
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.

Value

Return an object of BinaryOptions or ContingencyOptions or ContinuousOptions depending on whether the data-type is Binary, Contingency or Continuous respectively.

Examples


## Simple example with simulated contingency data
## load data
data(contingencydataunknown)
## usage of coclusterContingency function in its most simplest form
strategy = coclusterStrategy( nbinititerations = 5, nbxem = 2, nbiterations_int = 2
                            , nbiterationsxem = 10, nbiterationsXEM = 100, epsilonXEM=1e-5)
out<-coclusterContingency( contingencydataunknown, nbcocluster=c(2,3), strategy = strategy)
## Summarize the output results
summary(out)
## Plot the original and Co-clustered data 
plot(out)


blockcluster documentation built on June 24, 2024, 5:17 p.m.