Metadata-Version: 2.4
Name: sparklen
Version: 1.1.1
Summary: A statistical learning toolkit for high-dimensional Hawkes processes in Python
Author-email: "Romain E. Lacoste" <romain.lacoste@inria.fr>
Maintainer-email: "Romain E. Lacoste" <romain.lacoste@inria.fr>
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://github.com/romain-e-lacoste/sparklen
Project-URL: Repository, https://github.com/romain-e-lacoste/sparklen
Project-URL: Issues, https://github.com/romain-e-lacoste/sparklen/issues
Project-URL: Changelog, https://github.com/romain-e-lacoste/sparklen/blob/main/CHANGELOG.md
Project-URL: Paper, https://arxiv.org/abs/2502.18979
Keywords: python,machine-learning,statistics,optimization,regularization,maximum-likelihood-estimation,high-dimension,hawkes-process,empirical-risk-minimization
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development :: Libraries
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: matplotlib
Requires-Dist: numpy>=1.26
Requires-Dist: scipy
Requires-Dist: seaborn
Requires-Dist: scikit-learn
Requires-Dist: tabulate
Requires-Dist: tqdm
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Dynamic: license-file


<a href="https://github.com/romain-e-lacoste/sparklen">
    <img src="https://raw.githubusercontent.com/romain-e-lacoste/sparklen/main/doc/logos/sparklen-logo-black.svg" alt="Sparklen logo" width="250"/>
</a>


# Toolkit for Hawkes Processes in Python
[![CI](https://github.com/romain-e-lacoste/sparklen/actions/workflows/ci.yml/badge.svg)](https://github.com/romain-e-lacoste/sparklen/actions/workflows/ci.yml)
[![Python](https://img.shields.io/pypi/pyversions/sparklen.svg)](https://pypi.org/project/sparklen)
[![PyPI](https://img.shields.io/pypi/v/sparklen)](https://pypi.org/project/sparklen)
[![arXiv](https://img.shields.io/badge/arXiv-2502.18979-b31b1b?logo=arXiv)](https://arxiv.org/abs/2502.18979)
[![PyPI Downloads](https://static.pepy.tech/personalized-badge/sparklen?period=total&units=INTERNATIONAL_SYSTEM&left_color=GREY&right_color=BRIGHTGREEN&left_text=downloads)](https://pepy.tech/projects/sparklen)

## Overview

The purpose of the `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 the high-dimensional setting. It notably features:

  * An efficient cluster-based simulation method for generating events.

  * A highly versatile and flexible framework for performing inference of
    multivariate Hawkes processes.

  * Novel approaches to address the challenge of multiclass
    classification within the supervised learning framework.

## Installation

You can install `Sparklen` using **pip**, or from **source**.

### Install via pip

The easiest way to install `Sparklen` is using `pip`:

```bash
pip install sparklen
```

### Install from Source

`Sparklen` runs its computationally intensive parts in a `C++` core, connected
to `Python` through wrapper code generated by `SWIG`. Building from source
therefore needs a C++ compiler (GCC or Clang on Linux and macOS, Visual Studio
Build Tools on Windows). SWIG and NumPy are fetched automatically during the
build, so nothing else has to be installed by hand.

```bash
git clone https://github.com/romain-e-lacoste/sparklen.git
cd sparklen
pip install .
```

It's recommended to do this in a dedicated Python environment (e.g., `venv` or `conda`).

## Contributing

Bug reports and pull requests are welcome on
[GitHub](https://github.com/romain-e-lacoste/sparklen/issues).
[CHANGELOG.md](https://github.com/romain-e-lacoste/sparklen/blob/main/CHANGELOG.md)
lists the changes between versions.

## Citing this Work

If you found this package useful, please consider citing it in your work:

```bibtex
@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},
}
```

## Acknowledgement

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
