Skip to content

Commit

Permalink
Merge pull request #46 from danielskatz/patch-1
Browse files Browse the repository at this point in the history
minor JOSS changes
  • Loading branch information
pswpswpsw authored Feb 24, 2024
2 parents ac872b7 + 8ecb48c commit d104bf4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions docs/JOSS/paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ @article{kaptanoglu2022pysindy
number = {69},
pages = {3994},
author = {Alan A. Kaptanoglu and Brian M. de Silva and Urban Fasel and Kadierdan Kaheman and Andy J. Goldschmidt and Jared Callaham and Charles B. Delahunt and Zachary G. Nicolaou and Kathleen Champion and Jean-Christophe Loiseau and J. Nathan Kutz and Steven L. Brunton},
title = {PySINDy: A comprehensive Python package for robust sparse system identification},
title = {PySINDy: A comprehensive {P}ython package for robust sparse system identification},
journal = {Journal of Open Source Software}
}
@article{pedregosa2011scikit,
title={Scikit-learn: Machine learning in Python},
title={Scikit-learn: Machine learning in {P}ython},
author={Pedregosa, Fabian and Varoquaux, Ga{\"e}l and Gramfort, Alexandre and Michel, Vincent and Thirion, Bertrand and Grisel, Olivier and Blondel, Mathieu and Prettenhofer, Peter and Weiss, Ron and Dubourg, Vincent and others},
journal={the Journal of machine Learning research},
volume={12},
Expand Down Expand Up @@ -582,7 +582,7 @@ @article{de2020pysindy
number = {49},
pages = {2104},
author = {Brian M. de Silva and Kathleen Champion and Markus Quade and Jean-Christophe Loiseau and J. Nathan Kutz and Steven L. Brunton},
title = {PySINDy: A Python package for the sparse identification of nonlinear dynamical systems from data},
title = {PySINDy: A {P}ython package for the sparse identification of nonlinear dynamical systems from data},
journal = {Journal of Open Source Software}
}

Expand Down Expand Up @@ -642,7 +642,7 @@ @article{hoffmann2021deeptime
journal = {Machine Learning: Science and Technology},
number = {1},
pages = {015009},
title = {Deeptime: a Python library for machine learning dynamical models from time series data},
title = {Deeptime: a {P}ython library for machine learning dynamical models from time series data},
volume = {3},
doi={10.1088/2632-2153/ac3de0},
year = {2021}}
16 changes: 8 additions & 8 deletions docs/JOSS/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ bibliography: paper.bib

# Summary

`PyKoopman` is a Python package for the data-driven approximation of the Koopman operator associated with a dynamical systems. The Koopman operator is a principled linear embedding of nonlinear dynamics and facilitates the prediction, estimation, and control of strongly nonlinear dynamics using linear systems theory. In particular, `PyKoopman` provides tools for data-driven system identification for unforced and actuated systems that build on the equation-free dynamic mode decomposition (DMD) [@schmid2010jfm] and its variants [@Kutz2016book;@schmid2022dynamic;@brunton2022modern]. In this work, we provide a brief description of the mathematical underpinnings of the Koopman operator, an overview and demonstration of the features implemented in `PyKoopman` (with code examples), practical advice for users, and a list of potential extensions to `PyKoopman`. Software is available at \url{https://github.com/dynamicslab/pyKoopman}.
`PyKoopman` is a Python package for the data-driven approximation of the Koopman operator associated with a dynamical systems. The Koopman operator is a principled linear embedding of nonlinear dynamics and facilitates the prediction, estimation, and control of strongly nonlinear dynamics using linear systems theory. In particular, `PyKoopman` provides tools for data-driven system identification for unforced and actuated systems that build on the equation-free dynamic mode decomposition (DMD) [@schmid2010jfm] and its variants [@Kutz2016book;@schmid2022dynamic;@brunton2022modern]. In this work, we provide a brief description of the mathematical underpinnings of the Koopman operator, an overview and demonstration of the features implemented in `PyKoopman` (with code examples), practical advice for users, and a list of potential extensions to `PyKoopman`. The software is available at \url{https://github.com/dynamicslab/pyKoopman}.

# Statement of need

Engineers have long relied on linearization to bridge the gap between simplified, descriptions where powerful analytical tools exist, and the intricate complexities of nonlinear dynamics where analytical solutions are elusive [@ljung2010arc;@wright1999numerical]. Local linearization, implemented via first-order Taylor series approximation, has been widely used in system identification [@ljung2010arc], optimization [@wright1999numerical], and many other fields to make problems tractable.
Engineers have long relied on linearization to bridge the gap between simplified descriptions where powerful analytical tools exist, and the intricate complexities of nonlinear dynamics where analytical solutions are elusive [@ljung2010arc;@wright1999numerical]. Local linearization, implemented via first-order Taylor series approximation, has been widely used in system identification [@ljung2010arc], optimization [@wright1999numerical], and many other fields to make problems tractable.
However, many real-world systems are fundamentally nonlinear and require solutions outside of the local neighborhood where linearization is valid. Rapid progress in machine learning and big data methods are driving advances in the data-driven modeling of such nonlinear systems in science and engineering [@Brunton2019book].

In the diverse landscape of data-driven modeling approaches, Koopman operator theory has received considerable attention in recent years [@Budivsic2012chaos;@Mezic2013arfm;@Williams2015jnls;@klus2017data;@Li2017chaos;@Brunton2017natcomm]. The main idea is illustrated in Fig. \ref{fig:LinearizingTransformation}.
Expand All @@ -55,17 +55,17 @@ This methodology enables the application of closed-form, convergence-guaranteed
<!-- These strategies encompass not only linear methodologies [@Nelles2013book;@ljung2010arc] and dynamic mode decomposition (DMD) [@schmid2010jfm;@rowley2009spectral;@Kutz2016book], but also more advanced techniques such as nonlinear autoregressive algorithms [@Akaike1969annals;@Billings2013book], neural networks [@long2017pde;@yang2020physics;@Wehmeyer2018jcp;@Mardt2018natcomm;@vlachas2018data;@pathak2018model;@lu2019deepxde;@Raissi2019jcp;@Champion2019pnas;@raissi2020science], Gaussian process regression [@raissi2017parametric], operator inference, and reduced-order modeling [@Benner2015siamreview,@peherstorfer2016data,@qian2020lift], among others [@Giannakis2012pnas;@Yair2017pnas;@bongard_automated_2007;@schmidt_distilling_2009;@Daniels2015naturecomm;@brunton2016pnas;@Rudy2017sciadv]. -->


As a result, `PyKoopman` is developed as a Python package for approximating the Koopman operator associated with natural and actuated dynamical systems from measurement data.
Compared to implementation of DMD (e.g., `PyDMD` [@demo2018pydmd]) which can be viewed as a linear projection of Koopman operator, `PyKoopman` offers a comprehensive set of _nonlinear_ projection methods.
Specifically, `PyKoopman` offers tools for designing the observables (i.e., functions of the system state) and inferring a finite-dimensional linear operator that governs the dynamic evolution of these observables in time. These steps can either be performed sequentially [@Williams2015jcd;@Williams2015jnls] or combined, as demonstrated in more recent neural network models [@lusch2018deep;@otto2019linearly;@Mardt2018natcomm;@Takeishi2017nips]. Besides, we also support data from multiple trajectories. Once a linear embedding is discovered from the data, the linearity of the transformed dynamical system can be leveraged for enhanced interpretability [@pan2021sparsity] or for designing near-optimal observers [@surana2016linear] or controllers for the original nonlinear system [@korda2020optimal;@mauroy2020koopman;@kaiser2021data;@peitz2019koopman;@peitz2020data].
As a result, `PyKoopman` has been developed as a Python package for approximating the Koopman operator associated with natural and actuated dynamical systems from measurement data.
Compared to implementation of DMD (e.g., `PyDMD` [@demo2018pydmd],) which can be viewed as a linear projection of the Koopman operator, `PyKoopman` offers a comprehensive set of _nonlinear_ projection methods.
Specifically, `PyKoopman` offers tools for designing the observables (i.e., functions of the system state) and inferring a finite-dimensional linear operator that governs the dynamic evolution of these observables in time. These steps can either be performed sequentially [@Williams2015jcd;@Williams2015jnls] or combined, as demonstrated in more recent neural network models [@lusch2018deep;@otto2019linearly;@Mardt2018natcomm;@Takeishi2017nips]. In addition, we also support data from multiple trajectories. Once a linear embedding is discovered from the data, the linearity of the transformed dynamical system can be leveraged for enhanced interpretability [@pan2021sparsity] or for designing near-optimal observers [@surana2016linear] or controllers for the original nonlinear system [@korda2020optimal;@mauroy2020koopman;@kaiser2021data;@peitz2019koopman;@peitz2020data].



# Features

![External package dependencies of PyKoopman.\label{fig:package-structure-dependency}](./Fig2.png){ width=80% }

The core component of the PyKoopman package is the Koopman model class. We used several base classes from `scikit-learn` [@pedregosa2011scikit] to build the machine learning pipeline. We used `pytorch` [@paszke2019pytorch] and `lightning` [@Falcon_PyTorch_Lightning_2019] for implementing deep learning methods for Koopman operator. We also used `PyDMD` [@demo2018pydmd] to incorporate some existing implementation for regression after nonlinear observables are chosen. Finally, we used `derivative` [@kaptanoglu2022pysindy] to obtain time derivative to deal with non-uniformly sampled data. To summarize, the external package dependencies are depicted in Fig. \ref{fig:package-structure-dependency}.
The core component of the PyKoopman package is the Koopman model class. We used several base classes from `scikit-learn` [@pedregosa2011scikit] to build the machine learning pipeline. We used `pytorch` [@paszke2019pytorch] and `lightning` [@Falcon_PyTorch_Lightning_2019] to implement deep learning methods for Koopman operator. We also used `PyDMD` [@demo2018pydmd] to incorporate some existing implementation for regression after nonlinear observables are chosen. Finally, we used `derivative` [@kaptanoglu2022pysindy] to obtain time derivative to deal with non-uniformly sampled data. To summarize, the external package dependencies are depicted in Fig. \ref{fig:package-structure-dependency}.

<!-- Below are justifications for each dependency:
Expand All @@ -83,11 +83,11 @@ The core component of the PyKoopman package is the Koopman model class. We used

As illustrated in Fig. \ref{fig:koopman-formalism}, `PyKoopman` is designed to lift nonlinear dynamics into a linear system with linear actuation. Specifically, our `PyKoopman` implementation involves two major steps:

![Broad categorization of model types that can be identified with current `PyKoopman`. While the dotted parts (marked with ``$\cdot$'') can be simultaneously discovered within the framework, they are typically ignored for control purposes.\label{fig:koopman-formalism}](Fig3.png){ width=40% }

- `observables`: the nonlinear observables used to lift $\mathbf{x}$ to $\mathbf{z}$, and reconstruct $\mathbf{x}$ from $\mathbf{z}$;
- `regression`: the regression used to find the optimal $\mathbf{A}$.

![Broad categorization of model types that can be identified with current `PyKoopman`. While the dotted parts (marked with ``$\cdot$'') can be simultaneously discovered within the framework, they are typically ignored for control purposes.\label{fig:koopman-formalism}](Fig3.png){ width=40% }

Additionally, we have a `differentiation` module that evaluates the time derivative from a trajectory and the `analytics` module for sparsifying arbitrary approximations of the Koopman operator.


Expand Down

0 comments on commit d104bf4

Please sign in to comment.