Skip to main content

Toolbox for testing if a probability distribution fits a power law

Project description

powerlaw is a toolbox using the statistical methods developed in Clauset et al. 2007 and Klaus et al. 2011 to determine if a probability distribution fits a power law. Academics, please cite as:

Jeff Alstott, Ed Bullmore, Dietmar Plenz. (2013). powerlaw: a Python package for analysis of heavy-tailed distributions. arXiv:1305.0215 [physics.data-an]

Basic Usage

For the simplest, typical use cases, this tells you everything you need to know.:

import powerlaw
data = array([1.7, 3.2 ...]) #data can be list or Numpy array
results = powerlaw.Fit(data)
print results.power_law.alpha
print results.power_law.xmin
R, p = results.distribution_compare('power_law', 'lognormal')

For more explanation, understanding, and figures, see the working paper, which illustrates all of powerlaw’s features. For details of the math, see Clauset et al. 2007, which developed these methods.

Acknowledgements

Many thanks to Andreas Klaus, Mika Rubinov and Shan Yu for helpful discussions. Thanks also to Andreas Klaus, Aaron Clauset, Cosma Shaliz, and Adam Ginsburg for making their code available. Their implementations were a critical starting point for making powerlaw.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

powerlaw-1.0.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

powerlaw-1.0.linux-x86_64.exe (82.3 kB view details)

Uploaded Source

File details

Details for the file powerlaw-1.0.tar.gz.

File metadata

  • Download URL: powerlaw-1.0.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for powerlaw-1.0.tar.gz
Algorithm Hash digest
SHA256 8d55f9dbcc092d39558ddf39a820c410c925af1e86245850729e2ce7339fe97f
MD5 408a91ea8200119fefa8008ae9d05653
BLAKE2b-256 d3e26ae7ab64d8d18c306709d474a4caae313ff957dc11157c417165e8c83ba4

See more details on using hashes here.

File details

Details for the file powerlaw-1.0.linux-x86_64.exe.

File metadata

File hashes

Hashes for powerlaw-1.0.linux-x86_64.exe
Algorithm Hash digest
SHA256 7747d44761d8e67ab60bdd1889216bc935d26b6669558f16e4f3cee842ed010f
MD5 d104489f9009ca5f577c4a8d0a22c0de
BLAKE2b-256 470b99aca99ae977c9d696b911c436a196253fa97c33affe64f493f72f4ebf7e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page