简体   繁体   English

使Pagerank结果适合幂律分布

[英]Fitting pagerank results to a power law distribution

I have calculated pagerank values for a hyperlink network of websites (about 1000 nodes). 我已经计算出网站的超链接网络(约1000个节点)的pagerank值。 I have done this in R using igraph package. 我已经使用igraph包在R中完成了此操作。

I would now like to take the Top 10 pagerank values and visualise these top 10 websites against a power law graph, to give an idea of where they are situated in the graph. 我现在想采用排名前10的pagerank值,并根据幂定律图可视化这些排名前10的网站,以了解它们在图中的位置。

How would I go about taking these results and plotting them against a power law graph (eg to illustrate which sites are further down the long tail). 我将如何获得这些结果并将其与幂律图相对应(例如,说明哪些位置位于长尾巴的更远处)。

I am just trying to figure out a general formula or technique. 我只是想找出一个通用的公式或技术。

The values are as follows: 取值如下:

0.0810
0.0330
0.0318
0.0186
0.0161
0.0160
0.0158
0.0149
0.0136
0.0133

The way I would do this is to plot the density of the connectivity, and overlay the plot with the top 10 points. 我这样做的方法是绘制连接密度,并在图上覆盖前10个点。

Assuming you have the connectivity of all nodes already: 假设您已经具有所有节点的连接性:

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")

For example I've simulated the connectivity of 1000 nodes to follow a normal distribution: 例如,我已经模拟了1000个节点的连通性以遵循正态分布:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM