koopkernel_sequencer

Implementation of the Koopman Kernel Sequencer model.

https://github.com/ejbrun/koopkernel_sequencer

Science Score: 44.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
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Implementation of the Koopman Kernel Sequencer model.

Basic Info
  • Host: GitHub
  • Owner: ejbrun
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Size: 1.21 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 2
  • Releases: 0
Created over 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

Koopman Kernel Sequencer

Implementation of the Koopman Kernel Sequencer model. This model combines Koopman Kernel methods with a deep learning neural architecture.

The basic architecture of the NystroemKoopKernelSequencer is described in ./examples/intro_koopkernelseq.ipynb. The model comes in several architectural variants which are briefly discussed. Benchmarking of the variants is done for the chaotic Lorenz attractor in model_training/train_koopkernel_sequencer.py, results are plotted in ./examples/lorenz_system.ipynb. See below for a brief discussion.

Extensive explorations of the Koopman Kernel Sequencer in the context of tropical cyclone forecasting can be found at https://github.com/ejbrun/koopmanlearningtropical_cyclone.

Setup

To install the project, first clone the repository, and then run from the project folder: python -m venv .venv To activate the environment, run source .venv/bin/activate on Mac and Linux, or .venv\Scripts\activate on Windows. Then run pip install -e . to install the project.

To install torch CUDA, please follow the instructions at https://pytorch.org/get-started/locally/ depending on your CUDA version.s

For Compute Platform CUDA 12.6 and higher one can use the following

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126

Example: Chaotic Lorenz attractor

[Details in examples/lorenz_system.ipynb]

The Lorenz attractor is a paradigmatic example of a chaotic system. We use it to test the potential of the Koopman Kernel Sequencer to capture (highly nonlinear) chaotic dynamics. The Lorenz attractor is shown in the left plot of the figure below. The right plot shows validation RMSE for a 50-epochs training of the model.

Lorenz_attractor

The right plot shows the RMSE for two different model architectures (context_mode = full_context, last_context) and two kernel length scales (0.16, 0.24). In addition, the legend shows the respective training runtimes. The length scale is a hyperparameter of the kernel function used in the Koopman Kernel Sequencer. The context_mode argument controls how the context window of the time series is used to train the Koopman operator. For more details see examples/intro_koopkernelseq.ipynb. One observes that the larger length scale results in smaller RMSE values if training is performed sufficiently long. The option context_mode = last_context significantly reduces the required training runtime. This more efficient model architecture gives almost the same RMSE values along the training trajectory.

Owner

  • Name: Eric Brunner
  • Login: ejbrun
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Brunner"
  given-names: "Eric"
  orcid: "https://orcid.org/0000-0001-7631-6528"
title: "Koopman Kernel Sequencer"
version: 0.0.1
date-released: 2025-03-23
url: "https://github.com/ejbrun/koopkernel_sequencer"

GitHub Events

Total
  • Issues event: 1
  • Watch event: 1
  • Issue comment event: 1
  • Push event: 6
  • Public event: 1
Last Year
  • Issues event: 1
  • Watch event: 1
  • Issue comment event: 1
  • Push event: 6
  • Public event: 1