Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to estimate the exponent of a power law distribution using Python?

I'm currently doing some network analysis and I want to estimate the exponent of a power-law distribution of the average clustering co-efficient vs node degree. The preferred method is maximum likelihood estimation (MLE)

I know similar code has been implemented here: http://tuvalu.santafe.edu/~aaronc/powerlaws/

However, the code they have implemented is specifically to plot a curve Pr(X >= x) vs x where x is a node in a given sequence. In other words, Pr(X >= x) is the probability that there is a node in X which is equal or larger than x.

I have Googled for days and I still haven't managed to find any tools which would do this e.g. estimating the exponent of a power-law distribution given two sequences of values.

Thanks in advance.

like image 865
Mike Avatar asked Nov 05 '22 06:11

Mike


1 Answers

I understand this may be late but you can look into the `powerlaw' package which was released recently. It has an iPython notebook with working examples and figures.

like image 182
Dexter Avatar answered Nov 07 '22 22:11

Dexter