if (FALSE) {
## About the Parts/Functional Groups (FG)
blockProp <- list(c(0.16 ,0.40 ,0.44),c(0.3,0.7)) # prop of blocks in each FG
archiMultipartite <- rbind(c(1,2),c(2,2),c(1,1)) # architecture of the multipartite net.
nbNodes <- c(60,50)
## About the connection matrices
directed <- c(NA, TRUE, FALSE) # type of each network
model <- c('gaussian','bernoulli','poisson')
C1 <-
list(mean = matrix(c(6.1, 8.9, 6.6, 9.8, 2.6, 1.0), 3, 2),
var = matrix(c(1.6, 1.6, 1.8, 1.7 ,2.3, 1.5),3, 2))
C2 <- list(mean = matrix(c(0.7,1.0, 0.4, 0.6),2, 2))
m3 <- matrix(c(2.5, 2.6 ,2.2 ,2.2, 2.7 ,3.0 ,3.6, 3.5, 3.3),3,3 )
C3 <- list(mean = .5 * (m3 + t(m3)))
connectParam <- list(C1, C2, C3)
## Graph Sampling
mySampleMSBM <- sampleMultipartiteSBM(nbNodes, blockProp,
archiMultipartite, connectParam, model,
directed, dimLabels = c('A','B'), seed = 2)
listSBM <- mySampleMSBM$listSBM
estimOptions <- list(initBM = FALSE, nbCores = 2)
myMSBM <- estimateMultipartiteSBM(listSBM, estimOptions)
plot(myMSBM, type = "data")
plot(myMSBM, type = "expected")
plot(myMSBM, type = "meso")
}
Run the code above in your browser using DataLab