{"id":28751920,"url":"https://github.com/ethanjameslew/autokoopman","last_synced_at":"2025-06-16T23:07:33.095Z","repository":{"id":37100711,"uuid":"461353235","full_name":"EthanJamesLew/AutoKoopman","owner":"EthanJamesLew","description":"AutoKoopman - automated Koopman operator methods for data-driven dynamical systems analysis and control. ","archived":false,"fork":false,"pushed_at":"2024-05-07T16:11:41.000Z","size":39885,"stargazers_count":74,"open_issues_count":16,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-16T23:07:30.029Z","etag":null,"topics":["autoencoders","data-driven-dynamics","deep-learning","dynamic-mode-decomposition","dynamical-systems","koopman","koopman-operators","reachability","sindy","system-identification"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EthanJamesLew.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-02-20T01:10:11.000Z","updated_at":"2025-06-06T04:44:36.000Z","dependencies_parsed_at":"2024-04-26T19:24:24.580Z","dependency_job_id":"ca6a75eb-66c1-4dae-9baa-83c46a6832e5","html_url":"https://github.com/EthanJamesLew/AutoKoopman","commit_stats":{"total_commits":141,"total_committers":3,"mean_commits":47.0,"dds":"0.049645390070921946","last_synced_commit":"521cd56075a3e889cc1bba04643b724d960d3304"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/EthanJamesLew/AutoKoopman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EthanJamesLew%2FAutoKoopman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EthanJamesLew%2FAutoKoopman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EthanJamesLew%2FAutoKoopman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EthanJamesLew%2FAutoKoopman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EthanJamesLew","download_url":"https://codeload.github.com/EthanJamesLew/AutoKoopman/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EthanJamesLew%2FAutoKoopman/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260256257,"owners_count":22981807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autoencoders","data-driven-dynamics","deep-learning","dynamic-mode-decomposition","dynamical-systems","koopman","koopman-operators","reachability","sindy","system-identification"],"created_at":"2025-06-16T23:07:31.191Z","updated_at":"2025-06-16T23:07:33.066Z","avatar_url":"https://github.com/EthanJamesLew.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI version](https://badge.fury.io/py/autokoopman.svg)](https://badge.fury.io/py/autokoopman)\n[![license](https://img.shields.io/github/license/EthanJamesLew/AutoKoopman)](LICENSE)\n[![Conda CI Workflow](https://github.com/EthanJamesLew/AutoKoopman/actions/workflows/python-package-conda.yml/badge.svg)](https://github.com/EthanJamesLew/AutoKoopman/actions/workflows/python-package-conda.yml)\n[![Sphinx Workflow](https://github.com/EthanJamesLew/AutoKoopman/actions/workflows/documentation.yml/badge.svg)](https://github.com/EthanJamesLew/AutoKoopman/actions/workflows/documentation.yml)\n[![Jupyter Workflow](https://github.com/EthanJamesLew/AutoKoopman/actions/workflows/notebook.yml/badge.svg)](https://github.com/EthanJamesLew/AutoKoopman/actions/workflows/notebook.yml)\n\n![](https://raw.githubusercontent.com/EthanJamesLew/AutoKoopman/enhancement/v-0.30-tweaks/documentation/img/brand/logo-full.svg)\n\n# AutoKoopman\n\n## Overview\n\nAutoKoopman 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.\n\nThe library supports\n* Discrete-Time and Continuous-Time System Identification\n  * Extended Dynamic Mode Decomposition (EDMD) [[Williams et al.]](#1)\n  * Deep Koopman [[Li et al.]](#2)\n  * SINDy [[Brunton et al.]](#3)\n* Static Observables\n  * Random Fourier Features [[Bak et al.]](#4)\n  * Polynomial\n  * Neural Network [[Li et al.]](#2)\n* System Identification with Input and Control\n  * Koopman with Input and Control (KIC) [[Proctor et al.]](#5)\n* Online (Streaming) System Identification\n  * Online DMD [[Zhang et al.]](#6)\n* Hyperparameter Optimization\n  * Random Search\n  * Grid Search\n  * Bayesian Optimization\n\n## Use Cases\nThe 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.\n\n* **Prediction:** Predict the evolution of a system over long time horizons \n* **Control:** Synthesize control signals that achieve desired closed-loop behaviors and are optimal with respect to some objective.\n* **Verification:** Prove or falsify the safety requirements of a system.\n\n## Installation\n\nThe module is published on [PyPI](https://pypi.org/project/autokoopman/). It requires python 3.8 or higher. With pip installed, run\n```shell\npip install autokoopman\n```\nat the repo root. Run\n```shell\npython -c \"import autokoopman\"\n```\nto ensure that the module can be imported.\n\n## Examples\n\n### A Complete Example\nAutoKoopman has a convenience function `auto_koopman` that can learn dynamical systems from data in one call, given\ntraining data of trajectories (list of arrays),\n```python\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n# this is the convenience function\nfrom autokoopman import auto_koopman\n\nnp.random.seed(20)\n\n# for a complete example, let's create an example dataset using an included benchmark system\nimport autokoopman.benchmark.fhn as fhn\nfhn = fhn.FitzHughNagumo()\ntraining_data = fhn.solve_ivps(\n    initial_states=np.random.uniform(low=-2.0, high=2.0, size=(10, 2)),\n    tspan=[0.0, 10.0],\n    sampling_period=0.1\n)\n\n# learn model from data\nexperiment_results = auto_koopman(\n    training_data,          # list of trajectories\n    sampling_period=0.1,    # sampling period of trajectory snapshots\n    obs_type=\"rff\",         # use Random Fourier Features Observables\n    opt=\"grid\",             # grid search to find best hyperparameters\n    n_obs=200,              # maximum number of observables to try\n    max_opt_iter=200,       # maximum number of optimization iterations\n    grid_param_slices=5,   # for grid search, number of slices for each parameter\n    n_splits=5,             # k-folds validation for tuning, helps stabilize the scoring\n    rank=(1, 200, 40)       # rank range (start, stop, step) DMD hyperparameter\n)\n\n# get the model from the experiment results\nmodel = experiment_results['tuned_model']\n\n# simulate using the learned model\niv = [0.5, 0.1]\ntrajectory = model.solve_ivp(\n    initial_state=iv,\n    tspan=(0.0, 10.0),\n    sampling_period=0.1\n)\n\n# simulate the ground truth for comparison\ntrue_trajectory = fhn.solve_ivp(\n    initial_state=iv,\n    tspan=(0.0, 10.0),\n    sampling_period=0.1\n)\n\n# plot the results\nplt.plot(*trajectory.states.T)\nplt.plot(*true_trajectory.states.T)\n```\n\n## Architecture\n\nThe library architecture has a modular design, allowing users to implement custom modules and plug them into the learning pipeline with ease.\n\n![Library Architecture](https://github.com/EthanJamesLew/AutoKoopman/raw/enhancement/v-0.30-tweaks/documentation/img/autokoopman_objects.png)\n*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).\n\n## Documentation\n\nSee the\n[AutoKoopman Documentation](https://ethanjameslew.github.io/AutoKoopman/).\n\n## Citing AutoKoopman\n\nAutoKoopman has been published as a tool paper at ATVA 2023. The preprint can be found [here](https://www.researchgate.net/profile/Ethan-Lew/publication/374805680_AutoKoopman_A_Toolbox_for_Automated_System_Identification_via_Koopman_Operator_Linearization/links/6537cf9f1d6e8a70704c7f31/AutoKoopman-A-Toolbox-for-Automated-System-Identification-via-Koopman-Operator-Linearization.pdf).\n\nIf you cite AutoKoopman, please cite\n\nLew, E., Hekal, A., Potomkin, K., Kochdumper, N., Hencey, B., Bak, S., \u0026 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.\n\nBibtex:\n```\n@inproceedings{lew2023autokoopman,\n  title={Autokoopman: A toolbox for automated system identification via koopman operator linearization},\n  author={Lew, Ethan and Hekal, Abdelrahman and Potomkin, Kostiantyn and Kochdumper, Niklas and Hencey, Brandon and Bak, Stanley and Bogomolov, Sergiy},\n  booktitle={International Symposium on Automated Technology for Verification and Analysis},\n  pages={237--250},\n  year={2023},\n  organization={Springer}\n}\n```\n\n## References  \n\n\u003ca id=\"1\"\u003e[1]\u003c/a\u003e Williams, M. O., Kevrekidis, I. G., \u0026 Rowley, C. W. (2015). A data–driven approximation of the koopman operator: Extending dynamic mode decomposition. Journal of Nonlinear Science, 25, 1307-1346.\n\n \u003ca id=\"2\"\u003e[2]\u003c/a\u003e Li, Y., He, H., Wu, J., Katabi, D., \u0026 Torralba, A. (2019). Learning compositional koopman operators for model-based control. arXiv preprint arXiv:1910.08264.\n\n  \u003ca id=\"3\"\u003e[3]\u003c/a\u003e Brunton, S. L., Proctor, J. L., \u0026 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.\n\n  \u003ca id=\"4\"\u003e[4]\u003c/a\u003e Bak, S., Bogomolov, S., Hencey, B., Kochdumper, N., Lew, E., \u0026 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.\n\n  \u003ca id=\"5\"\u003e[5]\u003c/a\u003e Proctor, J. L., Brunton, S. L., \u0026 Kutz, J. N. (2018). Generalizing Koopman theory to allow for inputs and control. SIAM Journal on Applied Dynamical Systems, 17(1), 909-930.\n\n  \u003ca id=\"6\"\u003e[6]\u003c/a\u003e Zhang, H., Rowley, C. W., Deem, E. A., \u0026 Cattafesta, L. N. (2019). Online dynamic mode decomposition for time-varying systems. SIAM Journal on Applied Dynamical Systems, 18(3), 1586-1609.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanjameslew%2Fautokoopman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethanjameslew%2Fautokoopman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethanjameslew%2Fautokoopman/lists"}