kooplearn is a Python library to learn evolution operators — also known as Koopman or Transfer operators — from data. kooplearn models can:
- Predict the evolution of states and observables.
- Estimate the eigenvalues and eigenfunctions 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.
-
It is easy to use and strictly adheres to the scikit-learn API.
-
Kernel estimators are state-of-the-art:
kooplearnimplements the Reduced Rank Regressor from Kostic et al. 2022, which is provably better than the classical kernel DMD in estimating eigenvalues and eigenfunctions.- It also implements Nyström estimators and randomized estimators randomized for blazingly fast kernel learning.
-
Includes representation-learning losses (implemented both in Pytorch and JAX) to train neural-network Koopman embeddings.
-
Offers a collection of datasets for benchmarking evolution-operator learning algorithms.
To install the core version of kooplearn:
pip install kooplearnuv add kooplearnTo enable neural-network representations using kooplearn.torch or kooplearn.jax:
# Torch
pip install "kooplearn[torch]"
# JAX
pip install "kooplearn[jax]"# Torch
uv add "kooplearn[torch]"
# JAX
uv add "kooplearn[jax]"We welcome contributions from the community! If you're interested in contributing to kooplearn, please follow these steps:
- Fork the repository on GitHub.
- Clone your forked repository to your local machine.
- Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-nameorgit checkout -b bugfix/issue-number. - Make your changes and commit them with descriptive commit messages.
- Push your changes to your forked repository.
- Create a pull request from your branch to the
mainbranch of the original repository. - Provide a clear title and description for your pull request, including any relevant information about the changes you've made.
We appreciate your contributions and will review your pull request as soon as possible. Thank you for helping improve kooplearn!
This project is licensed under the MIT License.
kooplearn is an joint effort between teams at the Italian Institute of Technology in Genoa and the École polytechnique in Paris. The main contributors to the project are (in alphabetical order):
- Vladimir Kostic
- Karim Lounici
- Giacomo Meanti
- Erfan Mirzaei
- Pietro Novelli
- Daniel Ordonez
- Grégoire Pacreau
- Massimiliano Pontil
- Giacomo Turri
The mantainer of this repo is Pietro Novelli.
We hope you find kooplearn useful for your dynamical systems analysis. If you encounter any issues or have suggestions for improvements, please don't hesitate to raise an issue. Happy coding!