igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] degree distribution for bipartite network


From: Simone Gabbriellini
Subject: Re: [igraph] degree distribution for bipartite network
Date: Sat, 5 Feb 2011 18:41:40 +0100

Dear Arpad,

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? 

I've found a quite simple solution:

from numpy import array, bincount, unique

userdeg = array(g.vs.select(type=0)
userdd =  bincount(array(userdeg))

I use Chaco to plot, but anyway my x axis and y axis are: 

xaxis = unique(userdeg)
yaxis = userdd / float(sum(userdd))) )

Best,
Simone

Il giorno 05/feb/2011, alle ore 18.24, Horváth Árpád ha scritto:

> Dear Simone,
> 
> Tamas Nepusz írta (Dátum: 2011. Feb. 03.)
>> Python does not have built-in classes for histograms/distributions,
>> unlike R, so you have to do this manually or create a helper function.
>> Matplotlib can then be used for plotting.
> 
> I wrote a module to deals with degree distributions:
> http://mail.roik.bmf.hu/repo/cxnet/cxnet/degdist.py
> Its description is here:
> http://mail.roik.bmf.hu/cxnet/doc/html/tutorial_en.html#degreedistribution-class
> 
> It creates the distribution of an igraph (or networkx) graph and
> - calculate of the exponent of a power law distribution
> - plots cumulative and plain distribution
> It uses pylab (in the pylab-matplotlib package in debian and ubuntu)
> 
> Arpad
> 
> -- 
> Horvath  Arpad  <address@hidden>
> Honlap: http://www.arek.uni-obuda.hu/harp
> Munkahely: Óbudai Egyetem, AREK
> Munkahelyi tel: 22/316-260  125-as mellék
> 
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help




reply via email to

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