fitSimpleSBM {graphclust} | R Documentation |
Fit a stochastic block model to every network in a collection of networks.
Description
Applies the variational EM-algorithm implemented in the package blockmodels to every network.
Usage
fitSimpleSBM(
allAdj,
directed = TRUE,
nbSBMBlocks = Inf,
nbCores = 1,
outCountStat = TRUE
)
Arguments
allAdj |
list of adjacency matrices |
directed |
Networks are directed (TRUE by default) or undirected (FALSE). |
nbSBMBlocks |
upper bound for the number of blocks in the SBMs of the mixture components. Default is Inf |
nbCores |
number of cores for parallelization. |
outCountStat |
If TRUE (default), the output is a list of count statistics for every network. If FALSE, the output is a list of parameters of the stochastic block models fitted to every network. |
Value
list of count statistics for every network or list of parameters of the stochastic block models fitted to every network.
Examples
theta <- list(pi=c(.5,.5), gamma=matrix((1:4)/8,2,2))
obs <- rCollectSBM(rep(10,4), theta)$listGraphs
res <- fitSimpleSBM(obs, outCountStat=FALSE, nbCores=2)
[Package graphclust version 1.3 Index]