user2380782
user2380782

Reputation: 1446

create random graph with "same" power-law degree distribution

I have an undirected graph (a Protein-Protein Interaction network, PPi) for which I know the degree distribution approximates a power-law distribution. I want to create 1,000 random graphs replicating the number of nodes, edges and "similar" power-law outdegree distribution.

My real graph g.lcc has:

> g.lcc
#IGRAPH UN-- 12551 166189 -- 
#+ attr: name (v/c), V3 (e/n)

What I did so far was:

#Calculate the alpha for my distribution
alpha <- power.law.fit(degree(g.lcc, mode="out"))
#$continuous
#[1] FALSE

#$alpha
#[1] 4.529602

#$xmin
#[1] 178

#$logLik
#[1] -1123.405

#$KS.stat
#[1] 0.0446421

#$KS.p
#[1] 0.7825008

Then I run statitc.power.law.game using as exp.out the alpha generated with power.law.fit:

random.g <- static.power.law.game(12551, 166189, 4.53, exponent.in=-1, finite.size.correction=T)

However when I do that the two distributions are not even similar...

Any help??

P.S attached two images with real.ppi and random.g

Random graph Real PPI

Upvotes: 3

Views: 2547

Answers (1)

Tam&#225;s
Tam&#225;s

Reputation: 48071

How do you know that the degree distribution of your PPI network approximates a power-law? It could be any other fat-tailed distribution as well. Also, the $xmin value of the resulting power law fit indicates that the best fit is achieved by a lower cutoff at degree=178 and whatever happens at degrees below 178 is not approximated by the exponent that the method fitted.

If you want to create a random network that has exactly the same degree distribution as your graph, you can try using degree.sequence.game to generate one from scratch (make sure you use method="vl" or method="simple.no.multiple if you want to avoid multiple edges between the same pair of nodes), or use rewire.edges to rewrite the edges of your graph.

Re power laws, I recommend reading this paper about power-law-like distributions in empirical data.

Upvotes: 3

Related Questions