fitSimpleSBM function

Fit a stochastic block model to every network in a collection of networks.

Fit a stochastic block model to every network in a collection of networks.

Applies the variational EM-algorithm implemented in the package blockmodels to every network.

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.

Returns

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)
  • Maintainer: Tabea Rebafka
  • License: GPL-2
  • Last published: 2023-06-07

Useful links