Runs the variational expectation maximization algorithm for different numbers of latent groups, and selects the best overall model using the integrated completed likelihood criterion. See reference for a detailed explanation of the procedure.
expSBM_select(K_max, N, edgelist, method = "SBM_gaussian", directed = F,
trunc = T, tol = 0.001, n_iter_max = 100,
init_blur_value = 1, verbose = F)
Estimate and compare the models with number of latent groups equal to 1,2,...,K_max
.
Number of nodes.
A matrix with 4 columns: on the first column the sender node, on the second the receiver, on the third either a one or zero to indicate whether it is an interaction or a non-interaction respectively, on the fourth the corresponding exponential length.
Indicates the method used for the initialisation. Can be one of random
, SBM_binary
, SBM_gaussian
or spectral
. See expSBM_init
for more details.
TRUE
or FALSE
indicating whether interactions have an orientation or not.
TRUE
or FALSE
indicating whether the first and last interactions or non-interactions for every edge are assumed to be truncated or not.
Stop the maximization if the relative increase in the objective function is not larger than this value.
Stop the maximization if the number of iterations is larger than this value. This parameter can be set to zero or one for debug purposes.
A value from zero to one, indicating if the initialized partition should be perturbed with noise. The value one means no noise, whereas the value zero has maximum noise, i.e. each node is equally likely belonging to any of the K groups.
TRUE
or FALSE
indicating whether a lengthy output should be printed out.
A list with the fitted values for every model considered.
Integrated completed likelihood values for each model considered.
Optimal number of latent groups, according to the integrated completed likelihood criterion.
Output of the variational expectation maximization algorithm for the best overall model.
R. Rastelli and M. Fop (2019) "A dynamic stochastic blockmodel for interaction lengths", https://arxiv.org/abs/1901.09828
# NOT RUN {
set.seed(1)
data(high_school)
# }
# NOT RUN {
res <- expSBM_select(K_max = 8, N = 327, edgelist = high_school$edgelist,
method = "random", tol = 0.01)
# }
Run the code above in your browser using DataLab