sample_dclvm {nett} | R Documentation |
Sample from a DCLVM
Description
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}
where x_i = 2 e_{z_i} + w_i
, 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.
Usage
sample_dclvm(z, lambda, theta, npairs = NULL)
Arguments
z |
a vector of cluster labels |
lambda |
desired average degree of the network |
theta |
degree parameter |
npairs |
number of pairs of |
Details
Sample form a degree-corrected latent variable model with Gaussian kernel
Value
Adjacency matrix of DCLVM
[Package nett version 1.0.0 Index]