在这个模型中,每个顶点都由一个潜在位置向量表示。两个顶点之间存在边的概率由其潜在位置向量的点积给出。
参考文献
Christine Leigh Myers Nickel: Random dot product graphs, a model for social networks. Dissertation, Johns Hopkins University, Maryland, USA, 2006.
参见
sample_dirichlet()
, sample_sphere_surface()
和 sample_sphere_volume()
用于采样位置向量。
随机图模型(游戏)bipartite_gnm()
, erdos.renyi.game()
, sample_()
, sample_bipartite()
, sample_chung_lu()
, sample_correlated_gnp()
, sample_correlated_gnp_pair()
, sample_degseq()
, sample_fitness()
, sample_fitness_pl()
, sample_forestfire()
, sample_gnm()
, sample_gnp()
, sample_grg()
, sample_growing()
, sample_hierarchical_sbm()
, sample_islands()
, sample_k_regular()
, sample_last_cit()
, sample_pa()
, sample_pa_age()
, sample_pref()
, sample_sbm()
, sample_smallworld()
, sample_traits_callaway()
, sample_tree()
作者
Gabor Csardi csardi.gabor@gmail.com
示例
## A randomly generated graph
lpvs <- matrix(rnorm(200), 20, 10)
lpvs <- apply(lpvs, 2, function(x) {
return(abs(x) / sqrt(sum(x^2)))
})
g <- sample_dot_product(lpvs)
g
#> IGRAPH 0ebffc9 U--- 10 32 --
#> + edges from 0ebffc9:
#> [1] 1-- 3 1-- 4 1-- 5 1-- 6 1-- 7 1-- 9 2-- 3 2-- 5 2-- 6 2-- 7 2-- 9 2--10
#> [13] 3-- 5 3-- 6 3-- 7 3-- 8 3--10 4-- 5 4-- 6 4-- 8 4--10 5-- 6 5-- 7 5-- 8
#> [25] 6-- 7 6-- 8 6-- 9 7-- 9 7--10 8-- 9 8--10 9--10
## Sample latent vectors from the surface of the unit sphere
lpvs2 <- sample_sphere_surface(dim = 5, n = 20)
g2 <- sample_dot_product(lpvs2)
g2
#> IGRAPH faa8ab1 U--- 20 136 --
#> + edges from faa8ab1:
#> [1] 1-- 2 1-- 3 1-- 4 1-- 5 1-- 6 1-- 7 1-- 8 1-- 9 1--10 1--11 1--14 1--16
#> [13] 1--17 1--19 1--20 2-- 3 2-- 4 2-- 5 2-- 7 2-- 8 2-- 9 2--10 2--11 2--12
#> [25] 2--13 2--14 2--15 2--16 2--17 2--19 2--20 3-- 4 3-- 5 3-- 6 3-- 8 3-- 9
#> [37] 3--13 3--14 3--15 3--16 3--18 3--19 3--20 4-- 7 4-- 9 4--12 4--13 4--14
#> [49] 4--16 4--17 4--19 5-- 6 5-- 7 5-- 8 5--10 5--11 5--15 5--17 5--20 6-- 7
#> [61] 6-- 8 6--10 6--11 6--12 6--14 6--15 6--16 6--19 6--20 7-- 9 7--10 7--12
#> [73] 7--13 7--14 7--15 7--16 7--18 7--19 8--11 8--13 8--14 8--15 8--16 8--17
#> [85] 8--18 8--19 8--20 9--10 9--11 9--12 9--13 9--14 9--16 9--17 9--18 9--19
#> [97] 9--20
#> + ... omitted several edges