Description Usage Arguments Value Examples
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
1 2 3 4 5 6 7 8 |
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) |
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)
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.