Skip to content

Latest commit

 

History

History
72 lines (51 loc) · 2.34 KB

examples.rst

File metadata and controls

72 lines (51 loc) · 2.34 KB

Examples

Simple Koopman pipeline

../examples/1_example_pipeline_simple.py

Van der Pol Oscillator

../examples/2_example_pipeline_vdp.py

Cross-validation with scikit-learn

To enable cross-validation, pykoop strives to be fully-compatible with scikit-learn. All of its regressors and lifting functions pass scikit-learn's estimator checks, with minor exceptions made when necessary.

Regressor parameters and lifting functions can easily be cross-validated using scikit-learn:

../examples/3_example_pipeline_cv.py

Asymptotic stability constraint

In this example, three experimental EDMD-based regressors are compared to EDMD. Specifically, EDMD is compared to the asymptotic stability constraint and the H-infinity norm regularizer from [DF22] and [DF21], and the dissipativity constraint from [HIS19].

../examples/4_example_eigenvalue_comparison.py

Sparse regression

This example shows how to use pykoop.EdmdMeta to implement sparse regression with sklearn.linear_model.Lasso. The lasso promotes empty columns in the Koopman matrix, which means the corresponding lifting functions can be removed from the model.

../examples/5_example_sparse_regression.py

Radial basis functions on a pendulum

This example shows how thin-plate radial basis functions can be used as lifting functions to identify pendulum dynamics (where all trajectories have zero initial velocity). Latin hypercube sampling is used to generate 100 centers.

../examples/6_example_rbf_pendulum.py

Random Fourier features on a Duffing oscillator

This example shows how random Fourier features (and randomly binned features) can be used as lifting functions to identify Duffing oscillator dynamics. For more details on how these features are generated, see [RR07].

../examples/7_example_rff_duffing.py