Skip to main content

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.

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.3.0.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.3.0-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file hawkespylib-0.3.0.tar.gz.

File metadata

  • Download URL: hawkespylib-0.3.0.tar.gz
  • Upload date:
  • Size: 30.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hawkespylib-0.3.0.tar.gz
Algorithm Hash digest
SHA256 879f5b2b293bbe19158ecf605c641fb6af51ff540591f1d9e5d0748fbaa7eb33
MD5 2fc5480cff1e1315f9213c9ae8f0b8ff
BLAKE2b-256 29e9304e82a4705de5b94c3f48a4c5b541724f7fbee277158c1d4f1e264dec75

See more details on using hashes here.

Provenance

The following attestation bundles were made for hawkespylib-0.3.0.tar.gz:

Publisher: build_master.yml on Simbold/HawkesPyLib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hawkespylib-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: hawkespylib-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hawkespylib-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62cfe1cc271938d5d357d5264bd8604900b9118b73281d4ca2d8c4af187aab49
MD5 46271b1fba946d55dbe573cf69724f54
BLAKE2b-256 646a9b83d188a13cad3e50b5cdfefab361f1377d2ee48cd2409ac92865ec3fc5

See more details on using hashes here.

Provenance

The following attestation bundles were made for hawkespylib-0.3.0-py3-none-any.whl:

Publisher: build_master.yml on Simbold/HawkesPyLib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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