igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] question on scale free networks


From: Vincent Matossian
Subject: [igraph] question on scale free networks
Date: Sun, 4 Feb 2007 01:42:15 -0500


  Hi,

I am trying to get a graph that has power-law probability distribution P(k) := k^ (-alpha)

I realize that in ba.game the above alpha is not the same as the 'power' parameter which controls the preferential attachment (I noticed that a power of 1 gives an alpha of ~2). Am I missing a mechanism that would give me a graph that has a final degree distribution as above by controlling alpha, for example a logarithmic slope of - 2.5, -2.1 or -3 ?

Thanks,

Vincent

PS
For example:

plotsf=function(ba,offset=0.0){
  d=seq(0,max(degree(ba)))
  n=vcount(ba)*degree.distribution(ba)

  ld=log(d+offset,base=10)
  ln=log(n+offset,base=10)
 
  plot(ld,ln)   
  lfit<-lm(ln~ld)
  abline(coef=coef(lfit))
  print(coef(lfit))
}

ba=ba.game(10000,power=1)
plotsf(ba,-.5) # -.5 for adjustment for Inf values in computing log
# this returns a slope of -2
ba2=ba.game(10000,power=2)
plotsf(ba2,-.5)
# returns a slope of -0.6 but what control know would  get me a slope of -2.5 or  -3, ...?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]