Coder Social home page Coder Social logo

simbold / hawkespylib Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 1.21 MB

Python Package for simulation and estimation of Hawkes processes

Home Page: https://simbold.github.io/HawkesPyLib/

License: MIT License

Python 89.87% Shell 0.06% Mako 10.06%
hawkes-process inference point-process simulation numba statistics python3

hawkespylib's Introduction

Tests Build PyPI package PyPI - Python Version License: MIT

HawkesPyLib

A simple Python Package for simulation and inference of Hawkes processes. The library is currently under active development. More methods and functionality will be introduced shortly.

Installation

$ pip install HawkesPyLib

Documentation

A detailed description of the package can be found in the documentation.

Description

The library allows for simulation and fitting of Hawkes processes. Hawkes processes are self-exciting point processes and can be used to model or analyse event arrivals. Hawkes processes can be defined in terms of the conditional intensity function:

$$ \lambda(t) = \mu + \sum_{t_i < t} g(t-t_i) $$

where $\mu$ is a constant background intensity and the memory kernel function $g(t)$ specifies how past event arrivals influence the current state of the process.

The following Hawkes process models are currently available:

  • Univariate Hawkes process with single exponential memory kernel
  • Univariate Hawkes process with P-sum exponential memory kernel
  • Univariate Hawkes process with approximate power-law memory kernel
  • Univariate Hawkes process with approximate power-law memory kernel with smooth cutoff
  • Homogenous Poisson process

For each of the models there is a simulator class for generating Hawkes process samples using Ogata's thining algorithm. The estimator class allows for maximum likelihood estimation of the model as well as the calculation of the corresponding compensator, and evaluation of the conditional intensity function.

A quick example of simulating and estimating Hawkes processes can be found in the Examples folder.

The core simulation and estimation algorithms are optimized for speed by recursive calculation of the model and further accelerated by numba's JIT compiler.

License

HawkesPyLib is distributed under the terms of the MIT license.

hawkespylib's People

Contributors

simbold avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.