输入适合幂律以适应网络的度数分布 [英] Input to fit a power-law to degree distribution of a network

查看:137
本文介绍了输入适合幂律以适应网络的度数分布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用R来测试网络的度分布是否表现得像具有无标度属性的幂律.尽管如此,我已经读过不同的人以许多不同的方式执行此操作,其中一个令人困惑的点是应该在模型中使用的输入.

例如,

Barabasi建议对幂的互补累积分布"拟合幂律(请参阅高级主题3第四章.B,图4.22 ).但是,我看到人们将幂律拟合到图的度数(通过igraph::degree(g)获得),并且我也看到其他人将幂律拟合到度数分布(通过igraph::degree_distribution(g, cumulative = T)获得)

正如您在下面的可重现示例中看到的那样,这些选项给出了截然不同的结果.哪一个是正确的?以及如何从图形中获得度数的互补累积分布",以便能够拟合幂律?

library(igraph)

# create a graph
  set.seed(202)
  g <- static.power.law.game(500, 1000, exponent.out= 2.2, exponent.in = 2.2, loops = FALSE, multiple = T)

# get input to fit power-law.

  # 1) degrees of the nodes
    d <- degree(g, v = V(g), mode ="all")
    d <- d[ d > 0] # remove nodes with no connection

  # OR ?

  # 2) cumulative degree distribution
    d <- degree_distribution(g, mode ="all", cumulative = T)

# Fit power law
  fit <- fit_power_law(d, impelementation = "R.mle")

解决方案

好吧,这里的问题是您在这里有2个不同的统计信息. 节点的程度显示它与其他节点的连接数. 度分布是这些度在网络上的概率分布.

对我来说,将igraph::fit_power_law应用于度数分布没有多大意义,因为在一定程度上度数分布已经是幂定律.

但是,请不要忘记igraph::fit_power_law的实现选项比实现参数更多,这将导致不同的结果,具体取决于您要喂食"的内容.

I would like to use R to test whether the degree distribution of a network behaves like a power-law with scale-free property. Nonetheless, I've read different people doing this in many different ways, and one confusing point is the input one should use in the model.

Barabasi, for example, recommends fitting a power-law to the 'complementary cumulative distribution' of degrees (see Advanced Topic 3.B of chapter 4, figure 4.22). However, I've seen people fit a power-law to the degrees of the graph (obtained with igraph::degree(g)), and I've also seen others fitting a power-law to a degree distribution, obtained via igraph::degree_distribution(g, cumulative = T)

As you can see in the reproducible example below, these options give very different results. Which one is correct? and how can I get the "complementary cumulative distribution of degrees" to from a graph so I can fit a power-law?

library(igraph)

# create a graph
  set.seed(202)
  g <- static.power.law.game(500, 1000, exponent.out= 2.2, exponent.in = 2.2, loops = FALSE, multiple = T)

# get input to fit power-law.

  # 1) degrees of the nodes
    d <- degree(g, v = V(g), mode ="all")
    d <- d[ d > 0] # remove nodes with no connection

  # OR ?

  # 2) cumulative degree distribution
    d <- degree_distribution(g, mode ="all", cumulative = T)

# Fit power law
  fit <- fit_power_law(d, impelementation = "R.mle")

解决方案

Well, the problem here is that you have 2 different statistics here. The degree of a node shows how many connections it has to other nodes. The degree distribution is the probability distribution of those degrees over the network.

For me it doesn't make much sense to apply the igraph::fit_power_law on a degree distribution as the degree distribution is already a power law to a certain extent.

However, don't forget that the igraph::fit_power_law has more options than the implementation argument, which will result in different things, depending on what you're "feeding it".

这篇关于输入适合幂律以适应网络的度数分布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆