简体   繁体   English

输入以适应网络的程度分布的幂律

[英]Input to fit a power-law to degree distribution of a network

I would like to use R to test whether the degree distribution of a network behaves like a power-law with scale-free property. 我想用R来测试网络的度分布是否像具有无标度属性的幂律一样。 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 ). 例如,Barabasi建议将幂律拟合到度数的“互补累积分布”( 参见第4章的高级主题3.B,图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) 然而,我已经看到人们对图的度数拟合幂律(用igraph::degree(g) ),我也看到其他人通过igraph::degree_distribution(g, cumulative = T)得到幂律分布的幂律。 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. 那么,这里的问题是你在这里有2个不同的统计数据。 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. 对我而言,将igraph::fit_power_law应用于度数分布没有多大意义,因为度数分布在某种程度上已经是幂律。

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". 但是,不要忘记igraph::fit_power_law有比实现参数更多的选项,这将导致不同的东西,这取决于你“ igraph::fit_power_law ”的内容。

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

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