Skip to content
Power-Law Distribution Analysis
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
paper
powerlaw
.gitignore
LICENSE
MANIFEST
README.md
requirements.txt
setup.py

README.md

powerlaw

Documentation Status

DOI

Power-Law Distribution Analysis based on Power-law distributions in Empirical data paper (Summary).

Basic use

from powerlaw.regression import estimate_parameters, goodness_of_fit

data = [1.1, 2.2, 3.3, 4.4]

(xmin, alpha, ks_statistics) = estimate_parameters(data)

p_value = goodness_of_fit(data, xmin, alpha, ks_statistics)

Install

sudo pip install git+https://github.com/shagunsodhani/powerlaw.git

Alternatively

git clone https://github.com/shagunsodhani/powerlaw.git

cd powerlaw

sudo python setup.py install

Features

The current implementation supports fitting both continuous and discrete data to a power-law (using both Linear Regression and Maximum Likelihood Estimator method) and calculating the goodness of fit for the fitted power-law. Additionally, there are methods to generate random numbers for power-law, exponential and stretched exponential series. The complete documentation can be found here.

A short summary of the paper can be found here.

References

Clauset, Aaron, Cosma Rohilla Shalizi, and Mark EJ Newman. "Power-law distributions in empirical data." SIAM review 51.4 (2009): 661-703.

License

MIT

You can’t perform that action at this time.