predict_edges()
使用分层随机图模型来预测网络中缺失的边。这是通过对最优模型周围的分层模型进行抽样,并按其可能性比例进行抽样来实现的。如果给定 hrg()
且 start
参数设置为 TRUE
,则 MCMC 抽样从 hrg()
开始。否则,首先将 HRG 拟合到图中。
参考文献
A. Clauset, C. Moore, and M.E.J. Newman. Hierarchical structure and the prediction of missing links in networks. Nature 453, 98–101 (2008);
A. Clauset, C. Moore, and M.E.J. Newman. Structural Inference of Hierarchies in Networks. In E. M. Airoldi et al. (Eds.): ICML 2006 Ws, Lecture Notes in Computer Science 4503, 1–13. Springer-Verlag, Berlin Heidelberg (2007).
参见
其他分层随机图函数:consensus_tree()
, fit_hrg()
, hrg()
, hrg-methods
, hrg_tree()
, print.igraphHRG()
, print.igraphHRGConsensus()
, sample_hrg()
示例
if (FALSE) { # rlang::is_interactive()
## A graph with two dense groups
g <- sample_gnp(10, p = 1 / 2) + sample_gnp(10, p = 1 / 2)
hrg <- fit_hrg(g)
hrg
## The consensus tree for it
consensus_tree(g, hrg = hrg, start = TRUE)
## Prediction of missing edges
g2 <- make_full_graph(4) + (make_full_graph(4) - path(1, 2))
predict_edges(g2)
}