【问题标题】:Fitting pagerank results to a power law distribution将 pagerank 结果拟合到幂律分布
【发布时间】:2013-09-18 12:46:51
【问题描述】:

我已经计算了网站超链接网络(大约 1000 个节点)的 pagerank 值。我已经在 R 中使用 igraph 包完成了这项工作。

我现在想获取前 10 个 pagerank 值,并根据幂律图可视化这些前 10 个网站,以了解它们在图中的位置。

我将如何获取这些结果并将它们与幂律图进行对比(例如,说明哪些站点位于长尾下方)。

我只是想找出一个通用公式或技术。

取值如下:

0.0810
0.0330
0.0318
0.0186
0.0161
0.0160
0.0158
0.0149
0.0136
0.0133

【问题讨论】:

    标签: r networking igraph pagerank power-law


    【解决方案1】:

    我这样做的方法是绘制连通性的密度,并用前 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 个节点的连通性以遵循正态分布:

    【讨论】:

    • 我使用了你的代码,结果如下:imgur.com/yQBPDBh 我做错了什么吗?快到了……!
    • 鉴于您的网络是无规模的,这几乎正是您所期望看到的!
    • 您是否在考虑kP(k) 的情节?
    • 试着把它改成d &lt;- density(log(connectivity)),然后你应该得到一条直线,它的斜率是你的力量(基于我粗略地重新阅读文献)。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-27
    • 1970-01-01
    • 2014-02-27
    • 1970-01-01
    • 1970-01-01
    • 2021-06-04
    相关资源
    最近更新 更多