Description Usage Arguments Details Value Examples
View source: R/estimateScoreSBM.R
estimateScoreSBM
performs the estimation and model selection for the ScoreSBM model.
1 2 3 4 5 6 7 8 |
scoreList |
: list of Scores for each dyad of an underlying network |
directed |
: Boolean. If true the inference network is directed. Default value = FALSE. |
nparm |
: Boolean. If true then the emission distribution is Non Parametric (Default value FALSE) |
kerSigma |
: Plug-in bandwidth for non-parametric estimation. If not provided, will be estimated with Hpi (up to six scores). Default value is null |
estimOptions |
: tunes the optimization process (see details below) |
monitoring |
: specifies if the lowerBound along the VEM iterations is saved (monitoring = list(lowerBound = TRUE)) |
The list of parameters estimOptions
essentially tunes the optimization process and the variational EM algorithm, with the following parameters
"verbosity" controls the verbosity of the procedure (0, 1 or 2). Default is 1.
"exploreFactor" controls the exploration of the number of groups in the initialization step, Default is 1.5
"nbBlocksRange" minimal and maximal number or blocks explored. Default is c(1,Inf)
"nbCores" integer for number of cores used. Default is 1.
"maxIterVE" Maximum number of iterations in the VE step. Default is 100.
"maxIterVE" Maximum number of iterations in the VEM algorithm. Default is 1000.
"tauTol" Tolerance in the VEM algorithm. Default value tauTol = 2 * .Machine$double.eps
"etaTol" Tolerance in the VEM algorithm. Default value etaTol = 2 * .Machine$double.eps
"valCritStop" Algorithm stops when the difference on successive tau is below valCritStop. Default value is 1e-6
Each element of the output list contains the following quantites:
"theta"estimated parameters
"nbBlocks" number of blocks in the underlying network
"qDist" variational approximation of the the conditional distribution q(G,Z | data)
"ICL": Integrated Likelihood Criterion
"pen": Penalty term for model selection (included in the ICL)
"lowerBound": Lowerbound along the VEM iterations (provided if monitoring$lowerBound = TRUE
)
The output is a list of estimated models, each one corresponding to a number of blocks.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | nbNodes <- 60
directed <- FALSE
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)
scoreList <- dataSim$scoreNetworks
resEstim <- estimateScoreSBM(scoreList,directed)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.