sample_dclvm | R Documentation |
A DCLVM with K clusters has edges generated as
E[\,A_{ij} \mid x, θ\,] \;\propto\; θ_i θ_j e^{- \|x_i - x_j\|^2}
where x_i = 2 e_{z_i} + w_i, e_k is the kth 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 λ.
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)
z |
a vector of cluster labels |
lambda |
desired average degree of the network |
theta |
degree parameter |
npairs |
number of pairs of \{z_i, z_j\} |
Sample form a degree-corrected latent variable model with Gaussian kernel
Adjacency matrix of DCLVM
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.