Create a degree-corrected planted partition connectivity matrix with a given average expected degree.

pp_conn(
  n,
  oir,
  lambda,
  pri,
  theta = rep(1, n),
  normalize_theta = F,
  d = rep(1, length(pri))
)

Arguments

n

the number of nodes

oir

out-in-ratio

lambda

the expected average degree

pri

the prior on community labels

theta

node connection propensity parameter of DCSBM

normalize_theta

whether to normalize theta so that max(theta) == 1

d

diagonal of the connectivity matrix. An all-one vector by default.

Value

The connectivity matrix B of the desired DCSBM.