HawkesBook

raw JSON →
0.1.0 verified Fri May 01 auth: no python

A Python package implementing Hawkes process methods for inference, simulation, and related calculations. Version 0.1.0, early development stage.

pip install hawkesbook
error ModuleNotFoundError: No module named 'hawkesbook'
cause Package not installed or wrong Python environment.
fix
Run 'pip install hawkesbook' in the correct environment.
error AttributeError: module 'hawkesbook' has no attribute 'SimulateHawkes'
cause Importing from wrong location; SimulateHawkes is in the simulate submodule.
fix
Use 'from hawkesbook.simulate import SimulateHawkes'.
gotcha Version 0.1.0 is very early; API may change without notice.
fix Pin to exact version in requirements.
gotcha No documentation or type stubs yet; rely only on source code.
fix Read the source on GitHub for correct usage.

Simulate a univariate Hawkes process with exponential kernel and print event times.

from hawkesbook.simulate import SimulateHawkes
import numpy as np
# Simulate a Hawkes process
sim = SimulateHawkes(mu=1.0, alpha=0.5, beta=2.0)
times = sim.simulate(T=10.0)
print(times)