autokoopman

AutoKoopman - automated Koopman operator methods for data-driven dynamical systems analysis and control.

https://github.com/ethanjameslew/autokoopman

Science Score: 64.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: researchgate.net
  • Committers with academic emails
    2 of 4 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.7%) to scientific vocabulary

Keywords

autoencoders data-driven-dynamics deep-learning dynamic-mode-decomposition dynamical-systems koopman koopman-operators reachability sindy system-identification
Last synced: 6 months ago · JSON representation ·

Repository

AutoKoopman - automated Koopman operator methods for data-driven dynamical systems analysis and control.

Basic Info
  • Host: GitHub
  • Owner: EthanJamesLew
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 38 MB
Statistics
  • Stars: 78
  • Watchers: 4
  • Forks: 9
  • Open Issues: 16
  • Releases: 6
Topics
autoencoders data-driven-dynamics deep-learning dynamic-mode-decomposition dynamical-systems koopman koopman-operators reachability sindy system-identification
Created about 4 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md

PyPI version license Conda CI Workflow Sphinx Workflow Jupyter Workflow

AutoKoopman

Overview

AutoKoopman is a high-level system identification tool that automatically optimizes all hyper-parameters to estimate accurate system models with globally linearized representations. Implemented as a python library under shared class interfaces, AutoKoopman uses a collection of Koopman-based algorithms centered on conventional dynamic mode decomposition and deep learning. Koopman theory relies on embedding system states to observables; AutoKoopman provides major types of static observables.

The library supports * Discrete-Time and Continuous-Time System Identification * Extended Dynamic Mode Decomposition (EDMD) [Williams et al.] * Deep Koopman [Li et al.] * SINDy [Brunton et al.] * Static Observables * Random Fourier Features [Bak et al.] * Polynomial * Neural Network [Li et al.] * System Identification with Input and Control * Koopman with Input and Control (KIC) [Proctor et al.] * Online (Streaming) System Identification * Online DMD [Zhang et al.] * Hyperparameter Optimization * Random Search * Grid Search * Bayesian Optimization

Use Cases

The library is intended for a systems engineer / researcher who wishes to leverage data-driven dynamical systems techniques. The user may have measurements of their system with no prior model.

  • Prediction: Predict the evolution of a system over long time horizons
  • Control: Synthesize control signals that achieve desired closed-loop behaviors and are optimal with respect to some objective.
  • Verification: Prove or falsify the safety requirements of a system.

Installation

The module is published on PyPI. It requires python 3.8 or higher. With pip installed, run shell pip install autokoopman at the repo root. Run shell python -c "import autokoopman" to ensure that the module can be imported.

Examples

A Complete Example

AutoKoopman has a convenience function auto_koopman that can learn dynamical systems from data in one call, given training data of trajectories (list of arrays), ```python import matplotlib.pyplot as plt import numpy as np

this is the convenience function

from autokoopman import auto_koopman

np.random.seed(20)

for a complete example, let's create an example dataset using an included benchmark system

import autokoopman.benchmark.fhn as fhn fhn = fhn.FitzHughNagumo() trainingdata = fhn.solveivps( initialstates=np.random.uniform(low=-2.0, high=2.0, size=(10, 2)), tspan=[0.0, 10.0], samplingperiod=0.1 )

learn model from data

experimentresults = autokoopman( trainingdata, # list of trajectories samplingperiod=0.1, # sampling period of trajectory snapshots obstype="rff", # use Random Fourier Features Observables opt="grid", # grid search to find best hyperparameters nobs=200, # maximum number of observables to try maxoptiter=200, # maximum number of optimization iterations gridparamslices=5, # for grid search, number of slices for each parameter n_splits=5, # k-folds validation for tuning, helps stabilize the scoring rank=(1, 200, 40) # rank range (start, stop, step) DMD hyperparameter )

get the model from the experiment results

model = experimentresults['tunedmodel']

simulate using the learned model

iv = [0.5, 0.1] trajectory = model.solveivp( initialstate=iv, tspan=(0.0, 10.0), sampling_period=0.1 )

simulate the ground truth for comparison

truetrajectory = fhn.solveivp( initialstate=iv, tspan=(0.0, 10.0), samplingperiod=0.1 )

plot the results

plt.plot(trajectory.states.T) plt.plot(true_trajectory.states.T) ```

Architecture

The library architecture has a modular design, allowing users to implement custom modules and plug them into the learning pipeline with ease.

Library Architecture AutoKoopman Class Structure in the Training Pipeline. A user can implement any of the classes to extend AutoKoopman (e.g., custom observables, a custom tuner, a new system id estimator).

Documentation

See the AutoKoopman Documentation.

Citing AutoKoopman

AutoKoopman has been published as a tool paper at ATVA 2023. The preprint can be found here.

If you cite AutoKoopman, please cite

Lew, E., Hekal, A., Potomkin, K., Kochdumper, N., Hencey, B., Bak, S., & Bogomolov, S. (2023, October). Autokoopman: A toolbox for automated system identification via koopman operator linearization. In International Symposium on Automated Technology for Verification and Analysis (pp. 237-250). Cham: Springer Nature Switzerland.

Bibtex: @inproceedings{lew2023autokoopman, title={Autokoopman: A toolbox for automated system identification via koopman operator linearization}, author={Lew, Ethan and Hekal, Abdelrahman and Potomkin, Kostiantyn and Kochdumper, Niklas and Hencey, Brandon and Bak, Stanley and Bogomolov, Sergiy}, booktitle={International Symposium on Automated Technology for Verification and Analysis}, pages={237--250}, year={2023}, organization={Springer} }

References

[1] Williams, M. O., Kevrekidis, I. G., & Rowley, C. W. (2015). A data–driven approximation of the koopman operator: Extending dynamic mode decomposition. Journal of Nonlinear Science, 25, 1307-1346.

[2] Li, Y., He, H., Wu, J., Katabi, D., & Torralba, A. (2019). Learning compositional koopman operators for model-based control. arXiv preprint arXiv:1910.08264.

[3] Brunton, S. L., Proctor, J. L., & Kutz, J. N. (2016). Discovering governing equations from data by sparse identification of nonlinear dynamical systems. Proceedings of the national academy of sciences, 113(15), 3932-3937.

[4] Bak, S., Bogomolov, S., Hencey, B., Kochdumper, N., Lew, E., & Potomkin, K. (2022, August). Reachability of Koopman linearized systems using random fourier feature observables and polynomial zonotope refinement. In Computer Aided Verification: 34th International Conference, CAV 2022, Haifa, Israel, August 7–10, 2022, Proceedings, Part I (pp. 490-510). Cham: Springer International Publishing.

[5] Proctor, J. L., Brunton, S. L., & Kutz, J. N. (2018). Generalizing Koopman theory to allow for inputs and control. SIAM Journal on Applied Dynamical Systems, 17(1), 909-930.

[6] Zhang, H., Rowley, C. W., Deem, E. A., & Cattafesta, L. N. (2019). Online dynamic mode decomposition for time-varying systems. SIAM Journal on Applied Dynamical Systems, 18(3), 1586-1609.

Owner

  • Name: Ethan Lew
  • Login: EthanJamesLew
  • Kind: user
  • Location: Redwood City, CA
  • Company: Galois, Inc.

Citation (CITATION.cff)

cff-version: 1.2.0 
message: "If you use this software, please cite it as below."
authors:
- family-names: "Lew"
  given-names: "Ethan"
  orcid: "https://orcid.org/0000-0002-6509-6846"
- family-names: "Hekal"
  given-names: "Abdelrahman"
  orcid: "https://orcid.org/0009-0008-9685-0558"
- family-names: "Potomkin"
  given-names: "Kostiantyn"
  orcid: "https://orcid.org/0000-0002-4726-8931"
- family-names: "Kochdumper"
  given-names: "Niklas"
  orcid: "https://orcid.org/0000-0001-6017-7623"
- family-names: "Hencey"
  given-names: "Brandon"
  orcid: "https://orcid.org/0000-0001-9240-7999"
- family-names: "Bak"
  given-names: "Stanley"
  orcid: "https://orcid.org/0000-0003-4947-9553"
- family-names: "Bogomolov"
  given-names: "Sergiy"
  orcid: "https://orcid.org/0000-0002-0686-0365"
title: "AutoKoopman: A Toolbox for Automated System Identification via Koopman Operator Linearization"
version: 0.30.0 
doi: 10.1007/978-3-031-45332-8_12
date-released: 2023-10-19
url: "https://github.com/EthanJamesLew/AutoKoopman"

GitHub Events

Total
  • Watch event: 19
Last Year
  • Watch event: 19

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 195
  • Total Committers: 4
  • Avg Commits per committer: 48.75
  • Development Distribution Score (DDS): 0.041
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Ethan Lew e****w@g****m 187
Niklas Kochdumper n****r@t****e 5
Kostiantyn Potomkin k****n@g****m 2
abdu-hekal b****5@n****k 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 50
  • Total pull requests: 41
  • Average time to close issues: 2 months
  • Average time to close pull requests: 3 months
  • Total issue authors: 7
  • Total pull request authors: 2
  • Average comments per issue: 1.72
  • Average comments per pull request: 0.68
  • Merged pull requests: 35
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 0
  • Average comments per issue: 0.5
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • EthanJamesLew (25)
  • Abdu-Hekal (9)
  • KochdumperNiklas (5)
  • TUMcps (4)
  • stanleybak (3)
  • Bing008 (1)
  • ShankarChavan (1)
Pull Request Authors
  • EthanJamesLew (49)
  • Abdu-Hekal (1)
Top Labels
Issue Labels
feature (7) enhancement (4) bug (4) help wanted (3) documentation (1)
Pull Request Labels
enhancement (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 72 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 8
  • Total maintainers: 1
pypi.org: autokoopman

Automated Koopman Operator Linearization Library

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 72 Last month
Rankings
Dependent packages count: 6.6%
Downloads: 15.2%
Average: 18.3%
Stargazers count: 19.5%
Forks count: 19.6%
Dependent repos count: 30.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • matplotlib >=3.3.4
  • pandas >=1.1.5
  • pydata-sphinx-theme ==0.7.2
  • sphinx_mdinclude ==0.5.1
  • sympy >=1.9
setup.py pypi
  • matplotlib >=3.3.4
  • numpy >=1.19.0
  • pandas *
  • scikit-learn *
  • scipy >=1.5.4
  • sympy *
.github/workflows/python-package-conda.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/documentation.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • peaceiris/actions-gh-pages v3 composite
.github/workflows/notebook.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/publish.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • pypa/gh-action-pypi-publish release/v1 composite
pyproject.toml pypi
environment.yml conda
  • matplotlib >=3.3.4
  • pandas >=1.1.5
  • pip 24.0.*
  • pydata-sphinx-theme 0.7.2
  • pysindy 1.3.0.*
  • scikit-learn
  • sympy >=1.9