| FitSBM | R Documentation |
a fitted level of a unilevel network once $do_vem() is done
vboundvector of variational bound for convergence monitoring
adjacencyGet the adjacency matrix
maskGet the mask matrix for dealing with NA
nb_nodesGet the number of nodes of the level
nb_clustersGet the number of blocks
distributionGet the distribution used for the connections
directedGet if the level is directed or not
mixture_parameterAccess the block proportions
connectivity_parameterAccess the connectivity matrix
membershipAccess the variational parameters
entropyGet the entropy of the model
boundGet the variational bound of the model
df_mixtureGet the degree of freedom of the block proportion
df_connectGet the degree of freedom of the connection parameters
connectGet the number of observed dyads
ICLGet the ICL model selection criterion
penaltyGet the penalty used for computing the ICL
ZAccess the vector of block membership (clustering)
X_hatGet the connection probability matrix
X_likelihoodadjacency part of the log likelihood
Z_likelihoodblock part of the log likelihood
likelihoodcomplete log likelihood
new()Constructor for FitSBM R6 class
FitSBM$new( Q = 1, X = NULL, M = NULL, directed = FALSE, distribution = "bernoulli" )
QNumber of blocks
XAdjacency matrix
MMask matrix
directedboolean
distributionstring (only "bernoulli")
A new FitSBM object
update_alpha()Update the connection parameter for the M step
FitSBM$update_alpha(safeguard = 1e-06)
safeguardParameter live in a compact [safeguard, 1-safeguard]
update_pi()Update the upper level mixture parameter for the M step
FitSBM$update_pi(safeguard = 1e-06)
safeguardParameter live in a compact [safeguard, 1-safeguard]
init_clustering()init_clustering Initial clustering for VEM algorithm
FitSBM$init_clustering(safeguard = 1e-06, method = "hierarchical", Z = NULL)
safeguardParameter live in a compact [safeguard, 1-safeguard]
methodAlgorithm used to initiate the clustering, either
"spectral", "hierarchical" or "merge_split" (if Z is provided)
ZInitial clustering if provided
m_step()m_step Compute the M step of the VEM algorithm
FitSBM$m_step(safeguard = 1e-06)
safeguardParameter live in a compact [safeguard, 1-safeguard]
ve_step()Compute the VE step of the VEM algorithm
FitSBM$ve_step(threshold = 1e-06, fixPointIter = 100, safeguard = 1e-06)
thresholdThe convergence threshold
fixPointIterThe maximum number of fixed point iterations
safeguardParameter live in a compact [safeguard, 1-safeguard]
do_vem()Launch a Variational EM algorithm
FitSBM$do_vem( init = "hierarchical", threshold = 1e-06, maxIter = 1000, fixPointIter = 100, safeguard = 1e-06, Z = NULL )
initThe method for self$init_clustering
thresholdThe convergence threshold
maxIterThe max number of VEM iterations
fixPointIterThe max number of fixed point iterations for VE step
safeguardParameter live in a compact [safeguard, 1-safeguard]
ZInitial clustering if provided
permute_empty_class()permute_empty_class Put empty blocks numbers at the end
FitSBM$permute_empty_class()
clear()Reset all parameters
FitSBM$clear()
clone()The objects of this class are cloneable with this method.
FitSBM$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.