Sample an adjacency matrix from a truncated degree-corrected block model
(DCSBM) using a fast algorithm.
Usage
sample_tdcsbm(z, B, theta = 1)
Value
An adjacency matrix following DCSBM
Arguments
z
Node labels (\(n * 1\))
B
Connectivity matrix (\(K * K\))
theta
Node connectivity propensity vector (\(n * 1\))
Details
The function samples an adjacency matrix from a truncated DCSBM, with
entries having Bernoulli distributions with mean $$ E[A_{ij} | z] =
B_{z_i, z_j} \min(1, \theta_i \theta_j).$$ The approach uses the masking idea
of Aiyou Chen, leading to fast sampling for sparse networks. The masking,
however, truncates \(\theta_i \theta_j\) to at most 1, hence
we refer to it as the truncated DCSBM.