An R6 Class object, a collection of model for population of sbm netowrks
bmpop.Rd
An R6 Class object, a collection of model for population of sbm netowrks
An R6 Class object, a collection of model for population of sbm netowrks
Public fields
n
A list of size M with the number of nodes per network
A
List of incidence Matrix of size
n \times n
M
Number of networks
mask
List of M masks, indicating NAs in the matrices. 1 for NA, 0 else
directed
A boolean indicating if the networks are directed or not
distribution
Emission distribution either : "poisson" or "bernoulli"
net_id
A vector containing the "ids" or names of the networks (if none given, they are set to their number in A list)
model_list
A list of size Q containing the best models
global_opts
A list of options for the model space exploration. See details for more information on which options are available.
fit_opts
A list of options specifically for fitting the models.
fit_sbm
Pre-fitted sbm objects
Z_init
A list of initializations for the Z memberships.
free_density
A boolean indicating if we consider free density or if all networks have the same density
free_mixture
A boolean signaling if there is free mixture
ICL_sbm
A list storing the ICL for each sbm fitted
ICL
A list of size Q storing the best ICL found for each Q
BICL
A list of size Q storing the best BICL found for each Q
vbound
A list of size Q storing the best vbound found for each Q
best_fit
A fitSimpleSBMPop object changing regularly to store the current best fit.
logfactA
A quantity used with the Poisson probability distribution
improved
A field use at each step to check if it has improved.
Methods
Method new()
Create a new instance of the bisbmpop object
This class is generally called via the user function estimate_colBiSBM
Arguments
netlist
The list of M networks
net_id
A list of name for the networks, defaults to 1 to M if not provided
directed
A boolean indicating if the networks are directed or not
distribution
The emission distribution either "bernoulli" or "poisson"
free_density
If we account for different density between networks
free_mixture
A boolean indicating if there is free mixture
fit_sbm
The pre-fitted SBM
Z_init
A list providing a clustering of the nodes
global_opts
A list of global options used by the algorithm. See details of the user function for more information.
fit_opts
A list of fit options used by the algorithm. See details of the user function for more information.
Method optimize_from_sbm()
Method optimize_spectral()
Method optimize_init()
Arguments
index
The sequence of networks number going from 1 to M
Z
The provided initialization
Q
The number of clusters
nb_clusters
A subindex for model list, in practice always 1
Cpi
A list of size M containing the support for the possibly absent blocks, defaults to NULL
Calpha
A list of size M containing the support for the possibly absent interaction parameter, defaults to NULL
Method optimize_from_zinit()
Method forward_pass()
Usage
bmpop$forward_pass(
Q_min = self$global_opts$Q_min,
Q_max = self$global_opts$Q_max,
index = seq(self$M),
nb_clusters = 1L
)
Method backward_pass()
Usage
bmpop$backward_pass(
Q_min = self$global_opts$Q_min,
Q_max = self$global_opts$Q_max,
index = seq(self$M),
nb_clusters = 1L
)
Method optimize()
This method performs the burn in and the steps of moving window with cluster splitting (forward pass) and merging (backward pass) around the mode found.
Method choose_models()
Usage
bmpop$choose_models(models, Q, index = seq(self$M), nb_clusters = 1L)