classicLBM: Main script for a LBM

Description Usage Arguments Value Examples

View source: R/classicLBM.R

Description

Main script for a LBM

Usage

1
2
3
4
5
6
7
8
classicLBM(
  probability_distribution = "bernoulli",
  adj,
  initMethod = "kmeans_clust",
  VEMparam = list(maxIter = 50, fixPointIter = 5, threshold = 0.001, trace = TRUE,
    cores = 1),
  MAINparam = list(maxExplo = 1.5, maxGroups = 15, reinitialize = FALSE, cores = 1)
)

Arguments

probability_distribution

string can be 'bernoulli' or 'poisson'

adj

Matrix

initMethod

string can be 'hierarchical_clust' 'kmeans_clust' or 'spectral_clust'

VEMparam

list exemple = list(maxIter=50,fixPointIter=5,threshold=1e-3,trace=TRUE,cores=1)

MAINparam

list exemple = list(maxExplo=1.5,maxGroups=15,reinitialize=FALSE)

Value

List of models for different number of groups

Examples

1
2
3
4
5
6
7
8
npc <- c(50,40) # nodes per class
Q <- c(2,3) # classes
n <- npc * Q # nodes
Z1<-diag(Q[1])%x%matrix(1,npc[1],1)
Z2<-diag(Q[2])%x%matrix(1,npc[2],1)
P<-matrix(runif(Q[1]*Q[2]),Q[1],Q[2]) 
M<-1*(matrix(runif(n[1]*n[2]),n[1],n[2])<Z1%*%P%*%t(Z2)) ## adjacency matrix
classicLBM('bernoulli', M)

tcortier/correctedLBM documentation built on July 1, 2020, 5:30 a.m.