采样有限维向量以用作随机点积图中的潜在位置向量
值
一个 dim
(sample_dirichlet()
的 alpha
向量的长度)乘以 n
的矩阵,其列是样本向量。
参见
其他潜在位置向量采样器:sample_dirichlet()
, sample_sphere_volume()
示例
lpvs.sph <- sample_sphere_surface(dim = 10, n = 20, radius = 1)
RDP.graph.3 <- sample_dot_product(lpvs.sph)
vec.norm <- apply(lpvs.sph, 2, function(x) {
sum(x^2)
})
vec.norm
#> [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1