Skip to contents

Partition of a collection of bipartite networks based on their common mesoscale structures

Usage

clusterize_bipartite_networks(
  netlist,
  colsbm_model,
  net_id = NULL,
  distribution = "bernoulli",
  nb_run = 3L,
  global_opts = list(),
  fit_opts = list(),
  fit_init = NULL,
  full_inference = FALSE
)

Arguments

netlist

A list of matrices.

colsbm_model

Which colSBM to use, one of "iid", "pi", "rho", "pirho", "delta", "deltapi".

net_id

A vector of string, the name of the networks.

distribution

A string, the emission distribution, either "bernoulli" (the default) or "poisson"

nb_run

An integer, the number of run the algorithm do.

global_opts

Global options for the outer algorithm and the output

fit_opts

Fit options for the VEM algorithm

fit_init

Do not use! Optional fit init from where initializing the algorithm.

full_inference

The default "FALSE", the algorithm stop once splitting groups of networks does not improve the BICL criterion. If "TRUE", then continue to split groups until a trivial classification of one network per group.

Value

A list of models for the recursive partition of the collection of networks.

Details

The best partition could be extract with the function extract_best_partition(). The object of the list are fitBipartiteSBMPop object, so it is a model for a given number of blocks Q1, Q2.

This functions make call to estimate_colBiSBM.

See also

Examples

alpha1 <- matrix(c(0.8, 0.1, 0.2, 0.7), byrow = TRUE, nrow = 2)
alpha2 <- matrix(c(0.8, 0.5, 0.5, 0.2), byrow = TRUE, nrow = 2)
first_collection <- generate_bipartite_collection(
  nr = 50, nc = 25,
  pi = c(0.5, 0.5), rho = c(0.5, 0.5),
  alpha = alpha1, M = 2
)
second_collection <- generate_bipartite_collection(
  nr = 50, nc = 25,
  pi = c(0.5, 0.5), rho = c(0.5, 0.5),
  alpha = alpha2, M = 2
)

netlist <- append(first_collection, second_collection)

if (FALSE) { # \dontrun{
cl_separated <- clusterize_bipartite_networks(
  netlist = netlist,
  colsbm_model = "iid",
  global_opts = list(nb_cores = parallelly::availableCores(omit = 1L))
)
} # }