A package to learn Koopman operators
Project description
Learn Koopman and Transfer operators for Dynamical Systems and Stochastic Processes
kooplearn
is a Python library designed for learning Koopman or Transfer operators associated with dynamical systems. Given a nonlinear dynamical system $x_{t + 1} = S(x_{t})$, the Koopman operator provides a global linearization of the dynamics by mapping it to a suitable space of observables $\mathcal{F}$. An observable is any (scalar) function of the state. The Koopman operator $\mathsf{K}$ is defined as $$(\mathsf{K}f)(x_{t}) = f(x_{t + 1}) := f \circ S (x_t) \qquad f \in \mathcal{F}.$$
Similarly, given a stochastic process $X:= { X_{s} \colon s \in \mathbb{N}}$, its *Transfer operator returns the expected value of any observable forward in time. The Transfer operator $\mathsf{T}$ is defined as $$(\mathsf{T}f)(x) := \mathbb{E}\left[f(X_{t + 1}) \mid X_{t} = x \right] \qquad f \in \mathcal{F}.$$
kooplearn
provides a suite of algorithms for model training and analysis, enabling users to perform forecasting, spectral decomposition, and modal decomposition based on the learned operator.
Please note that kooplearn
is currently under active development, and while we are continuously adding new features and improvements, some parts of the library might still be a work in progress.
Features
- Implement different algorithms to learn Koopman or transfer operators for dynamical systems.
- Perform forecasting using the learned operators.
- Conduct spectral decomposition of the learned operator.
- Perform modal decomposition for further analysis.
Installation
To install the core version of kooplearn
, without optional dependencies, run
pip install kooplearn
To install the full version of kooplearn
, including Neural-Network models, and the dahsboard, run
pip install "kooplearn[full]"
To install the development version of kooplearn
, run
pip install --upgrade git+https://github.com/Machine-Learning-Dynamical-Systems/kooplearn.git
Contributing
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-name
orgit 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
main
branch 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
!
License
This project is licensed under the MIT License.
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!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kooplearn-1.1.3.tar.gz
.
File metadata
- Download URL: kooplearn-1.1.3.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07b7808e9a69e81ea9c6e6155a54870ed632d3ea3550a00eb54caadaddbb2669 |
|
MD5 | 21f4847cbdfcef01e722e3586ca32c06 |
|
BLAKE2b-256 | 42aeba13214e53395faac1883722c07cd0896c50e374858b8ec226602f498f1d |
File details
Details for the file kooplearn-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: kooplearn-1.1.3-py3-none-any.whl
- Upload date:
- Size: 71.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad38a8a9dec9bf85ee76a32631fe3628dc60e41d5b2c1b82b4411394477f2fa2 |
|
MD5 | 0a6dc906e84bef7d5322d2bf61451465 |
|
BLAKE2b-256 | df570a47b06ddc84d9b78025d4e9f8e4fe8c2e58fa3e0b29fba800ae0a2fe5a6 |