Description Details Super classes Active bindings Methods
R6 Class definition of a Simple SBM fit
R6 Class definition of a Simple SBM fit
This class is designed to give a representation and adjust an SBM fitted with blockmodels.
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 2
"verbosity"integer for verbosity (0, 1). Default is 1
"plot"boolean, should the ICL by dynamically plotted or not. Default is TRUE
"exploreFactor"control the exploration of the number of groups
"exploreMin"explore at least until exploreMin even if the exploration factor rule is achieved. Default 4. See the package blockmodels for details.
"exploreMin"Stop exploration at exploreMax even if the exploration factor rule is not achieved. Default Inf. See the package blockmodels for details.
"fast"logical: should approximation be used for Bernoulli model with covariates. Default to TRUE
sbm::SBM
-> sbm::SimpleSBM
-> SimpleSBM_fit
loglik
double: approximation of the log-likelihood (variational lower bound) reached
ICL
double: value of the integrated classification log-likelihood
penalty
double, value of the penalty term in ICL
entropy
double, value of the entropy due to the clustering distribution
storedModels
data.frame of all models fitted (and stored) during the optimization
new()
constructor for a Simple SBM fit
SimpleSBM_fit$new( adjacencyMatrix, model, directed, dimLabels = c(node = "nodeName"), covarList = list() )
adjacencyMatrix
square (weighted) matrix
model
character ('bernoulli'
, 'poisson'
, 'gaussian'
)
directed
logical, directed network or not. In not, adjacencyMatrix
must be symmetric.
dimLabels
list of labels of each dimension (in row, in columns)
covarList
and optional list of covariates, each of whom must have the same dimension as adjacencyMatrix
optimize()
function to perform optimization
SimpleSBM_fit$optimize(estimOptions = list())
estimOptions
a list of parameters controlling the inference algorithm and model selection. See details.
setModel()
method to select a specific model among the ones fitted during the optimization. Fields of the current SBM_fit will be updated accordingly.
SimpleSBM_fit$setModel(index)
index
integer, the index of the model to be selected (row number in storedModels)
reorder()
permute group labels by order of decreasing probability
SimpleSBM_fit$reorder()
show()
show method
SimpleSBM_fit$show(type = "Fit of a Simple Stochastic Block Model")
type
character used to specify the type of SBM
clone()
The objects of this class are cloneable with this method.
SimpleSBM_fit$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.