sample_dclvm.Rd
A DCLVM with \(K\) clusters has edges generated as
$$
E[\,A_{ij} \mid x, \theta\,] \;\propto\; \theta_i \theta_j e^{- \|x_i - x_j\|^2}
\quad \text{and} \quad x_i = 2 e_{z_i} + w_i
$$
where \(e_k\) is the \(k\)th basis vector of \(R^d\), \(w_i \sim N(0, I_d)\),
and \(\{z_i\} \subset [K]^n\). The proportionality constant is chosen such
that the overall network has expected average degree \(\lambda\).
To calculate the scaling constant, we approximate \(E[e^{- \|x_i - x_j\|^2}]\)
for \(i \neq j\) by generating random npairs
\(\{z_i, z_j\}\) and average over them.
sample_dclvm(z, lambda, theta, npairs = NULL)
a vector of cluster labels
desired average degree of the network
degree parameter
number of pairs of \(\{z_i, z_j\}\)
Sample form a degree-corrected latent variable model with Gaussian kernel