Skip to contents

Collapse n.merges blocks together via agglomerative merging. For each block, n.moves merges are proposed using the same move proposal algorithm used for the MCMC sweeps. The move proposals are ranked and n.merges moves are performed after accounting for duplicates. After the merge, n.sweeps MCMC sweeps are performed to stabilize the resulting partition.

Usage

collapse_step(
  graph,
  partition,
  degree_correction = FALSE,
  n.merges = 1,
  n.moves = 10,
  n.sweeps = 0,
  eps = 0.1,
  beta = 1,
  verbose = TRUE
)

Arguments

graph

An igraph graph.

partition

An vector of integers giving the block partition of nodes.

degree_correction

Whether to use degree correction.

n.merges

Number of block merges in collapse step.

n.moves

Number of merge trials per block.

n.sweeps

Number of sweeps after block merge.

eps

(optional) A number controlling the randomness of moves.

beta

(optional) A number controlling the greediness of moves.

verbose

Whether to print verbose output to console.