Skip to contents

Runs a n.sweeps MCMC sweep across all nodes (for algorithm details see Piexoto, 2014). Each node is given a chance to move blocks or stay in current block and all nodes are processed in random order for each sweep.

Usage

mcmc_sweep(G, p, B, dc = FALSE, n.sweeps = 1, eps = 0.1, beta = 1)

Arguments

G

An igraph graph.

p

Vector of integer values giving the initial block membership of each vertex

B

Number of blocks.

dc

Whether to use degree correction.

n.sweeps

Number of sweeps to run.

eps

(optional) A number controlling the randomness of moves.

beta

(optional) A number controlling the greediness of moves.

Value

A list object including the partition state after the last move, as well as the partition state with the lowest entropy.