FitSBM | R Documentation |
a fitted level of a unilevel network once $do_vem() is done
vbound
vector of variational bound for convergence monitoring
adjacency
Get the adjacency matrix
mask
Get the mask matrix for dealing with NA
nb_nodes
Get the number of nodes of the level
nb_clusters
Get the number of blocks
distribution
Get the distribution used for the connections
directed
Get if the level is directed or not
mixture_parameter
Access the block proportions
connectivity_parameter
Access the connectivity matrix
membership
Access the variational parameters
entropy
Get the entropy of the model
bound
Get the variational bound of the model
df_mixture
Get the degree of freedom of the block proportion
df_connect
Get the degree of freedom of the connection parameters
connect
Get the number of observed dyads
ICL
Get the ICL model selection criterion
penalty
Get the penalty used for computing the ICL
Z
Access the vector of block membership (clustering)
X_hat
Get the connection probability matrix
X_likelihood
adjacency part of the log likelihood
Z_likelihood
block part of the log likelihood
likelihood
complete log likelihood
new()
Constructor for FitSBM R6 class
FitSBM$new( Q = 1, X = NULL, M = NULL, directed = FALSE, distribution = "bernoulli" )
Q
Number of blocks
X
Adjacency matrix
M
Mask matrix
directed
boolean
distribution
string (only "bernoulli")
A new FitSBM object
update_alpha()
Update the connection parameter for the M step
FitSBM$update_alpha(safeguard = 1e-06)
safeguard
Parameter 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)
safeguard
Parameter 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)
safeguard
Parameter live in a compact [safeguard, 1-safeguard]
method
Algorithm used to initiate the clustering, either
"spectral", "hierarchical" or "merge_split" (if Z
is provided)
Z
Initial clustering if provided
m_step()
m_step Compute the M step of the VEM algorithm
FitSBM$m_step(safeguard = 1e-06)
safeguard
Parameter 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)
threshold
The convergence threshold
fixPointIter
The maximum number of fixed point iterations
safeguard
Parameter 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 )
init
The method for self$init_clustering
threshold
The convergence threshold
maxIter
The max number of VEM iterations
fixPointIter
The max number of fixed point iterations for VE step
safeguard
Parameter live in a compact [safeguard, 1-safeguard]
Z
Initial 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)
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.