igraph-help
[Top][All Lists]
Advanced

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

Re: Re: [igraph] degree distribution for bipartite network


From: Horváth Árpád
Subject: Re: Re: [igraph] degree distribution for bipartite network
Date: Sat, 5 Feb 2011 21:18:18 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

  Dear Simon,

 Simone Gabbriellini írta (Dátum: 2011. Feb. 05.)
> thanks for the info, looks like a cool module... my problem was to find two 
> separate degree distributions for the top and bottom sets of nodes in a 
> bipartite graph. Does your module handle that? 
No, it does not.
> 
> from numpy import array, bincount, unique
> 
> userdeg = array(g.vs.select(type=0)
Do you mean
userdeg = array(g.degree(g.vs.select(type=0))) ?

If you use my module, you can easily plot the cumulative degree
distribution of the type=0 nodes, or the plain degree distribution with
logarithmic binning, or calculate the exponent if it is a scale-free
networks like in the tutorial mentioned earlier. You should start with
this:

dd = degdist.DegreeDistribution(userdeg)
or directly
dd = degdist.DegreeDistribution(g.vs.select(type=0))

In the latter case you can handle directed graphs as well:
dd = degdist.DegreeDistribution(g.vs.select(type=0), direction="in")

However perhaps it is not so fast. It is not using bincount till.

(Chaco seems nice, but I am used to matplotlib.)

Arpad


-- 
Arpad Horvath <address@hidden>
Homepage: http://www.arek.uni-obuda.hu/harp/english.html
Workplace: Obuda University, Hungary
Phone: +36 22 316 260 ext. 125 ||  Fax: +36 22 312 337



reply via email to

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