Skip to main content

Python library for simulation and inference of Hawkes processes

Project description

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.

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

HawkesPyLib-0.2.2.tar.gz (30.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

HawkesPyLib-0.2.2-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file HawkesPyLib-0.2.2.tar.gz.

File metadata

  • Download URL: HawkesPyLib-0.2.2.tar.gz
  • Upload date:
  • Size: 30.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for HawkesPyLib-0.2.2.tar.gz
Algorithm Hash digest
SHA256 6c3dab78abfe77f1fd4c3a7ef3da8027435847294692f7479a3e5532ce440617
MD5 e78f843e624f963693e3411bd6ea88e4
BLAKE2b-256 69d159557aab6f62ea574e7061cea5de51933b47bfa8092d7529281d7f3953aa

See more details on using hashes here.

File details

Details for the file HawkesPyLib-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: HawkesPyLib-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for HawkesPyLib-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7856889fd964c0c6b302bebe7431b02329f930404552ca62c075d9cabed0845c
MD5 1b5b0ce544966b37f223e929a01c7e77
BLAKE2b-256 8e98ccb132e89fcd81ff927570f4e5ddef59bb161903b421ab67cb2c5680fd19

See more details on using hashes here.

Supported by

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