How galoisinc/dlkoopman works
Project type and purpose
• This is an open-source Python library (“dlkoopman”) implementing deep-learning-based Koopman theory for state and trajectory prediction of nonlinear dynamical systems.
• It provides training pipelines (autoencoder + Koopman‐matrix learning), prediction modules, hyperparameter search, metrics, and user documentation/examples.
File structure
Top-level directories/files:
• .github/workflows – CI pipelines for formatting (isort) and testing (pytest)
• Dockerfile – container image build
• pyproject.toml – packaging and deps (e.g. PyTorch)
• dlkoopman/ – core library modules
– config.py: load/validate training and prediction parameters
– nets.py: encoder/decoder and Koopman matrix learner network definitions
– hyp_search.py: hyperparameter search orchestration
– metrics.py: error metrics (ANAE, etc.)
– state_pred.py: state‐prediction interface (via eigendecomposition)
– traj_pred.py: trajectory‐prediction interface (via linear layer evolution)
– utils.py: shared helpers (data loaders, tensor transforms)
• docs/ – generated API documentation (HTML)
• examples/ – Jupyter notebooks demonstrating state and trajectory prediction pipelines on sample data
• tests/ – unit tests for each module, reference data files
README for additional insights
• Core training flow: raw state sequence → encoder → encoded states → decoder & Koopman matrix learner → linear evolution → decoder → losses (reconstruction, linearity, prediction).
• Prediction flow splits into (a) StatePred (use eigendecomposition for arbitrary index extrapolation) and (b) TrajPred (use learned linear layer to step trajectories).