-
An implementation of the columns-submatrix-row (CUR)-based dynamic mode decomposition (DMD).
-
The CUR DMD provides a fast and interpretable framework for generating and compressing timeseries dynamics.
-
Originally developed by K. Allen and S. De Pascuale in 2021 as part of the SCGSR research fellowship with results published in [1].
git clone https://github.com/KennethJAllen/dynamic-mode-decomposition
cd dynamic-mode-decomposition
- Install UV if not already installed.
- Create the virtual environment::
uv sync
To forecast timeseries data, use the forecast function in dmd.py.
forecast takes the following parameters:
data: A numpy array of data to forecast.rank: The rank of the low rank approximation to use the in DMD.num_forecasts: The number of time steps to forecast out.cur_or_svd: A stringcurfor the CUR based DMD orsvdfor the SVD based DMD.
in .demo/fluid_dynamics_demo.py there is a sample fluid dynamics simulation.
Synthetic fluid data generated is composed of three modes plus noise:
- A rotation vortex
- A standing wave
- A traveling wave
Each frame is
Two forecasts are generated using the first
The result is two
The dynamic mode decomposition, originally developed for simulating fluid dynamics, was designed to extract features from high dimensional data.
Given a collection of data vectors ${z 0, \dots, z_n}$, suppose the dynamics evolve linearly. That is, there exists an $n \times n$ linear operator $A$ such that $z_i = A z{i-1}$.
Letting
We can define
where
For large
Instead of calculating the full
The traditional way of computing
Given a desired rank
Then the
To forecast the data vectors
For theoretical results, see [3].
In practice, the SVD may be computationally prohibitive for very high dimensional data sets. While the SVD gives the best low-rank approximation, we can trade off error in the low rank approximation for computational speed.
We use the CUR decomposition for a low rank approxmation.
Let
To forecast the data vectors
For theoretical results, see [2].
-
[1] De Pascuale, S., Allen, K., Green, D. L., & Lore, J. D. (2023). Compression of tokamak boundary plasma simulation data using a maximum volume algorithm for matrix skeleton decomposition. Journal of Computational Physics, 484, 112089.
-
[2] Allen, Kenneth. A geometric approach to low-rank matrix and tensor completion. Diss. University of Georgia, 2021.
-
[3] Tu, Jonathan H. Dynamic mode decomposition: Theory and applications. Diss. Princeton University, 2013.

