Creates a randomly permuted DCPP connectivity matrix with a given average expected degree

gen_rand_conn(n, K, lambda, gamma = 0.3, pri = rep(1, K)/K, theta = rep(1, n))

Arguments

n

number of nodes

K

number of communities

lambda

expected average degree

gamma

a measure of out-in-ratio (convex combination parameter)

pri

the prior on community labels

theta

node connection propensity parameter of DCSBM, by default E(theta) = 1

Value

connectivity matrix B of the desired DCSBM.

Details

The connectivity matrix is a convex combination of a random symmetric permutation matrix and the matrix of all ones, with weights gamm and 1-gamma.