[英]Fitting pagerank results to a power law distribution
我已经计算出网站的超链接网络(约1000个节点)的pagerank值。 我已经使用igraph包在R中完成了此操作。
我现在想采用排名前10的pagerank值,并根据幂定律图可视化这些排名前10的网站,以了解它们在图中的位置。
我将如何获得这些结果并将其与幂律图相对应(例如,说明哪些位置位于长尾巴的更远处)。
我只是想找出一个通用的公式或技术。
取值如下:
0.0810
0.0330
0.0318
0.0186
0.0161
0.0160
0.0158
0.0149
0.0136
0.0133
我这样做的方法是绘制连接密度,并在图上覆盖前10个点。
假设您已经具有所有节点的连接性:
d <- density(connectivity)
top10 <- sort(connectivity, decreasing=TRUE)[1:10]
# get the height of the density for each of the top10 nodes:
top10y <- sapply(top10, function(node) {
diffs <- abs(node - d$x)
yloc <- which(diffs == min(diffs))[1] # in case more than one match
d$y[yloc]
})
# now plot
plot(d)
points(top10, top10y, col="red")
例如,我已经模拟了1000个节点的连通性以遵循正态分布:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.