The purpose of Sparklen
package is to provide the Python
community with
a complete suite of cutting-edge tools specifically tailored for
the study of exponential Hawkes processes, with a particular focus
on high-dimensional framework. It notably features:
-
A efficient cluster-based simulation method for generating events.
-
A highly versatile and flexible framework for performing inference of multivariate Hawkes process.
-
Novel approaches to address the challenge of multiclass classification within the supervised learning framework.
You can install Sparklen
using pip, or from source.
The easiest way to install Sparklen
is using pip
:
pip install sparklen
This section describes how to install the necessary dependencies to set up the package.
Sparklen
uses a C++
core code for computationally intensive
components, ensuring both efficiency and performance. The binding between C++
and Python
is handled through SWIG
wrapper code. Consequently, SWIG
is
required to build the package.
So first, you need to install SWIG
. Below are the instructions for various platforms.
If you're using Anaconda or Miniconda, install SWIG
from the conda-forge
channel:
conda install -c conda-forge swig
On Ubuntu or Debian-based systems, you can install SWIG
using apt
:
sudo apt update
sudo apt install swig
On macOS, you can install SWIG
using Homebrew
:
brew install swig
For Windows, follow these steps:
- Download the latest
SWIG
release from the SWIG website - Add the
SWIG
folder to your system's PATH environment variable
If you are using Chocolatey you can also install SWIG
by running:
choco install swig
Clone the repository to get the latest version of the source code:
git clone https://github.com/romain-e-lacoste/sparklen.git
cd sparklen
It's recommended to set up a dedicated Python environment (e.g., using venv
or conda
).
Once your environment is ready, install the package by running:
pip install .
If you found this package useful, please consider citing it in your work:
@article{lacoste2025sparklen,
title={Sparklen: A Statistical Learning Toolkit for High-Dimensional Hawkes Processes in Python},
author={Lacoste, Romain E.},
year={2025},
eprint={2502.18979},
archivePrefix={arXiv},
primaryClass={stat.ME},
url={https://arxiv.org/abs/2502.18979},
}
This work has been supported by the Chaire “Modélisation Mathématique et Biodiversité” of Veolia-École polytechnique-Museum national d’Histoire naturelle-Fondation X