Coder Social home page Coder Social logo

hitalex / powerlaw Goto Github PK

View Code? Open in Web Editor NEW

This project forked from csgillespie/powerlaw

0.0 2.0 0.0 5.65 MB

This package implements both the discrete and continuous maximum likelihood estimators for fitting the power-law distribution to data. Additionally, a goodness-of-fit based approach is used to estimate the lower cutoff for the scaling region.

powerlaw's Introduction

The poweRlaw package

This package implements both the discrete and continuous maximum likelihood estimators for fitting the power-law distribution to data. It also provides function to fit log-normal and Poisson distributions. Additionally, a goodness-of-fit based approach is used to estimate the lower cut-off for the scaling region.

The code developed in this package was influenced from the python and R code found at Aaron Clauset's website. In particular, the R code of Laurent Dubroca.

To cite this package in academic work, please use:

Colin S Gillespie (2013). Fitting heavy tailed distributions: the poweRlaw package. R package version 0.20.1.

Installation

This package is hosted on CRAN and can be installed in the usual way:

install.packages("poweRlaw")

Alternatively, the development version can be install from from github using the devtools package:

install.packages("devtools")
library(devtools)
install_github("poweRlaw", "csgillespie", subdir="pkg")

Note Windows users have to first install Rtools.

Getting Started

To get started, load the package

library(poweRlaw)

then work the through the two vignettes: getting started and examples. Alternatively, you can access the vignettes from within the package:

vignette("poweRlaw")
vignette("examples")

The plots below show the line of best fit to the Moby Dick and blackout data sets (from Clauset et al, 2009).

Cumulative CDF of the Moby Dick and blackout data sets with line of best fit.

Other information

  • If you have any suggestions or find bugs, please use the github issue tracker
  • Feel free to submit pull requests
  • The package does have an associated test suite (see directory tests above). However, since some of tests take a while to run, I've not included the suite with the package.
  • The vignette source code is the directory vignette above.

powerlaw's People

Contributors

csgillespie avatar

Watchers

 avatar  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.