Description Usage Arguments Details Value Examples
View source: R/initInferenceScoreSBM.R
This function initialises the inference method by mixing a Gaussian mixture on the scores of each pair of nodes and a SBM on the resulting estimated network G
1 | initInferenceScoreSBM(scoreList, directed = FALSE, estimOptions = list())
|
scoreList |
a list of the Scores (matrices of size nbNodes x nbNodes) |
directed |
a logical : TRUE if the underlying network is directed, FALSE otherwise (default value FALSE). |
estimOptions |
a list of parameters controlling the initialisation step of the inference method. See details. |
The list of parameters estimOptions
essentially tunes the optimization process and the variational EM algorithm, with the following parameters
"nbCores"integer for number of cores used. Default is detectCores()
"exploreFactor"control the exploration of the number of groups
"nbBlocksRange"minimal and maximal number or blocks explored
The output is a list containing the following entries.
"G": estimated underlyling network (binary)
"psi": estimated probability for each pair of nodes to be linked or not
"tau": list of posterior probabilities for each not to be in a blocks. The length of the list corresponds to the various models explored by the SBM
"ICL": Penalized likelihood for each of the estimated model
An initialisation point (list, see Details here after) for the VEM algortihms for several numbers of blocks
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | nbNodes = 60
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 <- 2
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, blockProp,connectParam,emissionParam,seed = NULL)
init <- initInferenceScoreSBM(dataSim$scoreNetworks)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.