Skip to content

whenxuan: update the time series augmentation#39

Merged
wwhenxuan merged 14 commits intomainfrom
master
Mar 5, 2026
Merged

whenxuan: update the time series augmentation#39
wwhenxuan merged 14 commits intomainfrom
master

Conversation

@wwhenxuan
Copy link
Copy Markdown
Owner

This pull request significantly expands the augmentation capabilities of the s2generator package by introducing several new time series augmentation methods and improving the modularity and organization of the augmentation code. The most important changes include the addition of new augmentation functions (such as amplitude modulation, censoring, empirical mode modulation, spike injection, Wiener filtering, linear trend, and mixup), refactoring of the frequency perturbation method, and updates to the package's initialization and utility files to support these new features.

New Augmentation Methods:

  • Added amplitude_modulation, censor_augmentation, empirical_mode_modulation, spike_injection, wiener_filter, add_linear_trend, and time_series_mixup augmentation functions, each in their own module files, and updated the package's __init__.py to expose these methods. [1] [2] [3] [4] [5] [6] [7]

Refactoring and Improvements:

  • Refactored the frequency perturbation augmentation: renamed the file to _frequency_perturbation.py, changed the main argument name to time_series, added input validation, and improved documentation for clarity and robustness. [1] [2]
  • Updated interpolation utility imports and exports to support new augmentation methods, adding linear_interpolation, cubic_spline_interpolation, and lagrange_interpolation to the utilities and package initialization files. [1] [2] [3]

Minor Code Quality Improvements:

  • Improved formatting in s2generator/base.py for clarity in the val_diff method.

These changes collectively make the augmentation module more extensible and provide a richer set of tools for time series data augmentation.

@wwhenxuan wwhenxuan merged commit c142945 into main Mar 5, 2026
1 check failed
@wwhenxuan wwhenxuan added the enhancement New feature or request label Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant