Plot the mesocopic view of the multipartite network obtained by the Genreliazed block models. resMBM is the results of of MBM fitting (output of multipartiteBMFixedModel for given numbers of clusters or multipartiteBM if the number of clusters is selected)
plotMBM(resMBM, whichModel = 1, mycol = NULL, thres = 0.01, maxCurved = 3)
resMBM | A fitted Generalized BlockModel |
---|---|
whichModel | The index corresponding to the model to plot (default is 1, the best model) |
mycol | A list of colors for the functional groups |
thres | A threshold under which edges correponding to probability of connections are not plotted |
maxCurved | graphical parameter : curvature of the edges |
namesFG <- c('A','B') list_pi = list(c(0.16 ,0.40 ,0.44),c(0.3,0.7)) E <- rbind(c(1,2),c(2,2),c(1,1)) typeInter <- c( "inc","diradj", "adj") v_distrib <- c('gaussian','bernoulli','poisson') list_theta <- list() list_theta[[1]] <- list() list_theta[[1]]$mean <- matrix(c(6.1, 8.9, 6.6, 9.8, 2.6, 1.0), 3, 2) list_theta[[1]]$var <- matrix(c(1.6, 1.6, 1.8, 1.7 ,2.3, 1.5),3, 2) list_theta[[2]] <- 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 ) list_theta[[3]] <- (m3 + t(m3))/2 list_Net <- rMBM(v_NQ = c(60,50),E , typeInter, v_distrib, list_pi, list_theta, namesFG = namesFG, seed = 2)$list_Net res_MBMsimu <- multipartiteBM(list_Net, v_distrib, namesFG = c('A','B'), v_Kinit = c(2,2), nbCores = 2,initBM = FALSE)#> [1] "------------Nb of entities in each functional group--------------" #> A B #> 60 50 #> [1] "------------Probability distributions on each network--------------" #> [1] "gaussian" "bernoulli" "poisson" #> [1] "-------------------------------------------------------------------" #> [1] " ------ Searching the numbers of blocks starting from [ 2 2 ] blocks" #> [1] "ICL : -6247.51 . Nb of blocks: [ 2 2 ]" #> [1] "ICL : -5727.89 . Nb of blocks: [ 3 2 ]" #> [1] "Best model------ ICL : -5727.89 . Nb of clusters: [ 3 2 ] for [ A , B ] respectively"plotMBM(res_MBMsimu)