Add dataset augmentation and reduction utilities for SINDY workflow#578
Closed
ChrisRackauckas-Claude wants to merge 2 commits into
Closed
Add dataset augmentation and reduction utilities for SINDY workflow#578ChrisRackauckas-Claude wants to merge 2 commits into
ChrisRackauckas-Claude wants to merge 2 commits into
Conversation
This PR implements the feature requested in SciML#332, adding support for: 1. **Delay embedding** (`delay_embedding`): Create time-delay coordinates from data, useful for Takens' embedding theorem and HAVOK analysis 2. **Hankel matrix construction** (`hankel_matrix`): Build Hankel matrices from 1D time series, enabling Hankel DMD and related methods 3. **Dimensionality reduction** (`reduce_dimension`, `truncated_svd`): Project data onto principal components with automatic or manual rank selection These utilities enable HAVOK-style workflows where: - Time series data is embedded via delay coordinates or Hankel matrices - SVD is used to identify dominant modes - Sparse regression discovers dynamics in the reduced space References: - Brunton et al. (2017) "Chaos as an intermittently forced linear system" - Arbabi & Mezic (2017) "Ergodic theory, dynamic mode decomposition, and computation of spectral properties of the Koopman operator" Fixes SciML#332 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements the feature requested in #332, adding dataset augmentation and reduction utilities to automate the SINDY workflow:
New Functions
delay_embedding(X, num_delays; τ=1)- Create time-delay coordinates from datahankel_matrix(x, num_rows)- Build Hankel matrices from 1D time seriestruncated_svd(X, rank)- Compute truncated singular value decompositionreduce_dimension(X, rank)- Project data onto top singular vectorsreduce_dimension(X)- Automatic rank selection using optimal thresholdUse Case: HAVOK Analysis
These utilities enable HAVOK-style workflows:
References
Testing
All existing tests pass plus new tests for:
Fixes #332
cc @ChrisRackauckas
🤖 Generated with Claude Code