Kooplearn¶
kooplearn is a Python library to learn evolution operators — also known as Koopman [1] or Transfer [2] operators — from data. kooplearn models can
Predict the evolution of states and observables.
Estimate the eigenvalues and eigenfucntions of the learned evolution operators.
Compute the dynamic mode decomposition of states and observables.
Learn neural-network representations \(x_t \mapsto \varphi(x_t)\) for evolution operators.
Why Choosing kooplearn?¶
It is easy to use, and strictly adheres to the scikit-learn API. Its Kernel estimators are state-of-the-art, and blazingly fast ⚡️:
Fit time of a Kernel model (Gaussian kernel) on a dataset of 5000 observations from the Lorenz 63 dynamical system. Runned on a system equipped with an Intel Core i9-9900X CPU (3.50GHz) and 48GB of RAM memory.¶
Fit time of a Kernel model (Gaussian kernel) on a dataset of 5000 observations from the Lorenz 63 dynamical system. Runned on a system equipped with an Intel Core i9-9900X CPU (3.50GHz) and 48GB of RAM memory.¶
Kooplearn also includes representation learning losses (implemented both in PyTorch and JAX) to train neural-network Koopman embeddings, and offers a collection of datasets for benchmarking evolution operator learning algorithms.
Installation¶
To install the core version of kooplearn, run
pip install kooplearn
uv add kooplearn
To be able to learn neural-network representations using the representation-learning losses in kooplearn.torch or kooplearn.jax, run
# Torch
pip install "kooplearn[torch]"
# JAX
pip install "kooplearn[jax]"
# Torch
uv add "kooplearn[torch]"
# JAX
uv add "kooplearn[jax]"
Quickstart¶
import numpy as np
from kooplearn.datasets import make_duffing
from kooplearn.kernel import KernelRidge
# Sample data from the Duffing oscillator
data = make_duffing(X0 = np.array([0, 0]), n_steps=1000)
# Fit the model
model = KernelRidge(n_components=4, kernel='rbf', alpha=1e-5)
model.fit(data)
Citing kooplearn¶
@article{kooplearn,
title={kooplearn: A Scikit-Learn Compatible Library of Algorithms for Evolution Operator Learning},
author={Giacomo Turri and Grégoire Pacreau and Giacomo Meanti and Timothée Devergne and Daniel Ordonez and Erfan Mirzaei and Bruno Belucci and Karim Lounici and Vladimir R. Kostic and Massimiliano Pontil and Pietro Novelli},
year={2026},
eprint={2512.21409},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2512.21409},
}
Learn more¶
Bernard O Koopman. Hamiltonian systems and transformation in hilbert space. Proceedings of the National Academy of Sciences, 17(5):315–318, 1931.
David Applebaum. Lévy Processes and Stochastic Calculus. Cambridge University Press, April 2009. ISBN 9780511809781. URL: http://dx.doi.org/10.1017/CBO9780511809781, doi:10.1017/cbo9780511809781.