An R6 Class object, a collection of model for population of BiSBM networks
bisbmpop.Rd
This object contain all the logic and methods to estimate a colBiSBM model
Public fields
n
A list with two dimensions, each of size M for the rows and cols
A
List of incidence Matrix of size
n[[1]][m]xn[[2]][m]
M
Number of networks
mask
List of M masks, indicating NAs in the matrices. 1 for NA, 0 else
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 Q1max * Q2max containing the best models
discarded_model_list
A list of size Q1max * Q2max * (nb_models - 1) containing the discarded 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.
separated_inits
A nested list : Q1 init containing Q2 init with each entry containing list of size M storing the separated inits for the class.
exploration_order_list
A list used to store the path taken in the state space.
Z_init
A list of initializations for the Z memberships.
free_mixture_row
A boolean signaling if there is free mixture on the row blocks
free_mixture_col
A boolean signaling if there is free mixture on the columns blocks
ICL
A matrix of size Q1*Q2 storing the best ICL found for each value of Q1, Q2.
sep_BiSBM
A named list containing attributes for each sep BiSBM.
BICL
A matrix of size Q1*Q2 storing the best BICL found for each value of Q1, Q2.
vbound
A matrix of size Q1*Q2 storing the best vbound found for each value of Q1, Q2.
best_fit
A fitBipartiteSBMPop object changing regularly to store the current best fit.
adjusted_fit
Defining a field in case the user wants to adjust a prefitted bisbmpop.
logfactA
A quantity used with the Poisson probability distribution
improved
A field use at each step to check if it has improved.
moving_window_coordinates
A list of size two containing the coordinates of the bottom left and top right points of the square
old_moving_window_coordinates
A list containing the previous coordinates of the moving window.
joint_modelisation_preferred
A boolean to store the preferred modelisation.
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
distribution
The emission distribution either "bernoulli" or "poisson"
free_mixture_row
A boolean indicating if there is free mixture on the row blocks
free_mixture_col
A boolean indicating if there is free mixture on the column blocks
Z_init
A bidimensional list providing a clustering of the row and column 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 split_clustering()
Method merge_clustering()
Method greedy_exploration()
Usage
bisbmpop$greedy_exploration(
starting_point,
max_iter = self$fit_opts$greedy_exploration_max_steps,
max_step_without_improvement =
self$fit_opts$greedy_exploration_max_steps_without_improvement
)
Method optimize()
This method performs the burn in (ie initialization + greedy exploration) and the steps of moving window with cluster splitting and merging around the mode found.
Method moving_window()
This method is a moving windows over the Q1xQ2 space for the number of clusters
Method truncate_discarded_model_list()
This method remove the worst models regarding the BICL criterion.
Method point_is_in_limits()
Method store_criteria_and_best_fit()
This method stores the criteria (vbound, ICL, BICL) of the models in model_list attribute and at the end choose the best model using the BICL criterion.
Method compute_sep_BiSBM_BICL()
This method performs the computation of BiSBM for each of the network in the netlist.
Method choose_joint_or_separated()
Using the BICL criterion, the best model fitted after the procedure and the separated Bi SBM this method choose the one that maximizes the BICL criterion.