rScoreSBM: Simulate Score SBM

Description Usage Arguments Value Examples

View source: R/rScoreSBM.R

Description

rScoreMBM simulates a collection of networks which are score versions of un underlying network. This network may be directed or not. See vignette for more informations

Usage

1
2
3
4
5
6
7
8
rScoreSBM(
  nbNodes,
  directed,
  blockProp,
  connectParam,
  emissionParam,
  seed = NULL
)

Arguments

nbNodes

: number of nodes

directed

: directed or not (directed = TRUE or FALSE)

blockProp

: proportions of the Blocks. Vector of size nbBlocks

connectParam

: probabilities of connections inside and between blocks. Matrix of size nbBlocks.

emissionParam

: parameters of the emission of the Score SBM. List of two terms : noEdgeParam and edgeParam. Each element is a list of means (vector or size nbScores) and variance matrix (square matrix of size nbScores)

seed

: set the seed for the random simulation (default value = NULL)

Value

A list of containing the score networks (scoreNetworks a list of length nbScores of matrices of dimension nbNodes x nbNodes), the true underlying network (trueNetwork) and the clustering of the nodes (memberships)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
nbNodes  <- 100
directed <- TRUE
blockProp <- c(1/3,1/2,1/6)
nbBlocks   <- length(blockProp)
connectParam <- matrix(rbeta(nbBlocks^2,1.5,1.5 ),nbBlocks,nbBlocks)
connectParam <- 0.5*(connectParam + t(connectParam))
emissionParam <- list()
nbScores <- 4
emissionParam$noEdgeParam <- list(mean=rep(0,nbScores));
emissionParam$noEdgeParam$var <- diag(0.1,nrow = nbScores,ncol = nbScores)
emissionParam$edgeParam <- list( mean= 1:nbScores)
emissionParam$edgeParam$var <-  diag(0.1,nrow = nbScores,ncol = nbScores)
dataSim <- rScoreSBM(nbNodes,directed = TRUE, blockProp,connectParam,emissionParam,seed = NULL)

Sophiedonnet/NoisySBM documentation built on Oct. 20, 2020, 12:04 p.m.