Skip to main content

A modern Python point process library with deep Hawkes specialization, dual-domain interfaces for quantitative finance and computational neuroscience.

Project description

intensify

PyPI Python License: MIT CI

A modern Python point process library with deep Hawkes specialization — built for quantitative finance and computational neuroscience, tested on real spike-train recordings, and JAX-accelerated end-to-end.

pip install intensify

Quickstart

import numpy as np
import intensify as its

# Simulate some event times
events = np.array([0.1, 0.5, 1.2, 1.8, 2.3, 3.1, 3.7, 4.4])
T = 5.0

# Fit a univariate Hawkes model with exponential kernel
model = its.Hawkes(mu=0.5, kernel=its.ExponentialKernel(alpha=0.3, beta=1.5))
result = model.fit(events, T=T)

print(f"Branching ratio: {result.branching_ratio_:.3f}")
print(f"Log-likelihood:  {result.log_likelihood:.3f}")
print(f"Fitted params:   {result.flat_params()}")

# Visualize fitted intensity and diagnostics
its.plot_intensity(result)

Features

  • Core processes: homogeneous / inhomogeneous Poisson, Cox (Log-Gaussian, Shot-Noise), Hawkes (univariate, multivariate, marked, nonlinear / inhibitory).
  • Kernel family: Exponential, Sum-of-Exponentials, Power-Law, Approximate Power-Law (Bacry–Muzy), Nonparametric (piecewise-constant). Every kernel is supported in every MLE path.
  • Inference: MLE via JAX autodiff with an O(N) recursive likelihood for exponential-family kernels; EM for mixtures; online (streaming) updates; Bayesian MCMC (experimental, numpyro backend).
  • Diagnostics: time-rescaling theorem (KS + QQ on inter-compensator increments — the mathematically correct form), AIC/BIC, residual intensity.
  • Simulation: Ogata thinning (general) and cluster/branching (Galton–Watson).
  • Stationarity enforcement: projected gradient for multivariate Hawkes; spectral radius of the kernel-norm matrix reported on every multivariate FitResult.
  • Backends: JAX (JIT + autodiff, default) with a NumPy fallback. Switch at runtime with its.set_backend("numpy").

Why intensify?

intensify and tick solve partly overlapping problems. Pick the right tool:

Capability intensify tick
Joint MLE of (μ, α, β) — fits the decay for you — (decay must be supplied)
MLE for power-law, approx-power-law, nonparametric kernels
Marked Hawkes fit with any kernel
Nonlinear (softplus / sigmoid / relu) Hawkes, signed kernels
Multivariate stationarity enforcement (projected gradient)
Time-rescaling test on inter-compensator increments
Python 3.10 – 3.14 support, pure-Python install 3.8 only, C++ build
Microsecond fits for exp kernels with known decay still improving ✓ (C++)

Concrete numbers, head-to-head: docs/benchmarks.md. Short version, on the apples-to-apples problem (decay-given, the case tick can solve at all): univariate fit is 2.6 ms vs tick 1 ms; multivariate mv_exp_5d is 17 ms vs tick 2 ms — and intensify is more accurate (parameter RMSE 0.041 vs 0.052). For kernels tick doesn't ship (power-law, nonparametric, signed, marked, nonlinear) intensify is the only option. pyhawkes is no longer usable — its transitive deps depend on APIs removed from SciPy 1.0 in 2017.

Documentation

Full docs: https://hillmatt7.github.io/intensify

Citation

If you use intensify in academic work, please cite it:

@software{intensify,
  author = {Hill, Matthew},
  title  = {intensify: A modern Python point process library with deep Hawkes specialization},
  year   = {2026},
  url    = {https://github.com/hillmatt7/intensify}
}

See CITATION.cff for the machine-readable form.

Contributing & changes

License

MIT — see 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

intensify-0.2.0.tar.gz (169.4 kB view details)

Uploaded Source

Built Distribution

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

intensify-0.2.0-py3-none-any.whl (80.6 kB view details)

Uploaded Python 3

File details

Details for the file intensify-0.2.0.tar.gz.

File metadata

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

File hashes

Hashes for intensify-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ea84f14791590f6dea0f3917461214c2b33433f541cc27e492d4825840e49b66
MD5 d99bd228136d450a3dc4112abad60012
BLAKE2b-256 005549e50417c657f6ce9be7afbdb803a43138043bdcf143d1de588c6e59043a

See more details on using hashes here.

Provenance

The following attestation bundles were made for intensify-0.2.0.tar.gz:

Publisher: publish.yml on hillmatt7/intensify

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

File details

Details for the file intensify-0.2.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for intensify-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22d65d9e6f3a5cce6cf99255444d7db01029b45258d9d04a5c6179da7d2f397e
MD5 4d81d07cb0fac052cf67ab0fe3e6576c
BLAKE2b-256 b617241d6d0e129973127636bbb98b0a8119db11539b84961a9986cab18a701e

See more details on using hashes here.

Provenance

The following attestation bundles were made for intensify-0.2.0-py3-none-any.whl:

Publisher: publish.yml on hillmatt7/intensify

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 Pingdom Monitoring Sentry Error logging StatusPage Status page