Skip to contents

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

Usage

clusterize_networks(
  netlist,
  colsbm_model,
  net_id = NULL,
  directed = NULL,
  distribution = "bernoulli",
  fit_sbm = NULL,
  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", "delta", "deltapi".

net_id

A vector of string, the name of the networks.

directed

A boolean, are the networks directed or not.

distribution

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

fit_sbm

A list of fitted models using the sbm package. Use to speed up the initialization.

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 FitSimpleSBMPop object, so it is a model for a given number of blocks Q.

See also

Examples


#' # Trivial example with Gnp networks:
Net <- lapply(
  list(.7, .7, .2, .2),
  function(p) {
    A <- matrix(0, 15, 15)
    A[lower.tri(A)][sample(15 * 14 / 2, size = round(p * 15 * 14 / 2))] <- 1
    A <- A + t(A)
  }
)
if (FALSE) { # \dontrun{
cl <- clusterize_networks(Net,
  colsbm_model = "iid",
  directed = FALSE,
  distribution = "bernoulli",
  nb_run = 1
)
} # }