Giter VIP home page Giter VIP logo

powerlaw's Introduction

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. This package is in "open beta", which means everything pretty much works but it's being tweaked and expanded on. Academics, please cite as:

Jeff Alstott. (2012). powerlaw Python package. Web address: pypi.python.org/pypi/powerlaw.

Basic Usage

For the simplest, typical use cases, that 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.

Quick Links

Installation

Working paper illustrating all of powerlaw's features, with figures

Known Issues

Update Notifications, Mailing List, and Contacts

Note! This code works on Python 2.x, not 3.x. This code was developed and tested with the `Enthought Python Distribution

and will update to 3.x whenever Enthought updates to 3.x.

The full version of Enthought is available for free for academic use.

Acknowledgements

Many thanks to Mika Rubinov and Shan Yu for helpful discussions and to Adam Ginsburg for posting his code, which inspired the xmin-selection function of this toolbox.

powerlaw's People

Contributors

jeffalstott avatar

Watchers

Matthias Ekman avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.