SynSet
Examples:
Raises:
SynSet.generate
Returns:
SynAugment
- :meth:
augmentfits a parametric generator per series and simulates from it (IDs"{original_id}_aug_{i}"). - :meth:
mixupforms convex combinations of scaled series (mean absolute scaling by default; z-normalization is optional) (IDs"mixup_{i}"). - :meth:
mbbbootstraps decomposition remainders in moving blocks (IDs"{original_id}_mbb_{i}"). - :meth:
dbaaverages nearest neighbours with DTW barycenters (IDs"{original_id}_dba_{i}").
augment:
- For each unique series in the input DataFrame, analyze its statistical properties
- Auto-select the most appropriate generator (or use user override)
- Fit generator parameters to match the series’ statistical fingerprint
- Generate n_augment synthetic series that preserve these properties
- Return combined DataFrame with original and synthetic series
mbb, shorter than four
observations) are skipped with a logged warning by :meth:mixup,
:meth:mbb, and :meth:dba.
Parameters:
Initialize the SynAugment instance.
Parameters:
SynAugment.analyze
Returns:
Raises:
SynAugment.augment
Returns:
Raises:
SynAugment.augment_single_series
Returns:
SynAugment.mixup
1..max_mix source series,
taking a random window of their shared (minimum) length, scaling each
window, and combining them with convex weights sampled from a
Dirichlet(alpha) distribution. Unlike :meth:augment, a mixup
series is not tied to a single source: it blends the dynamics of
several, which broadens a small panel without fitting any generator.
Because the mixed series live in scaled space (different sources have
different magnitudes), the output retains the chosen scaling rather
than any single source’s level. Use scaling="none" to mix raw
values when all series already share a scale.
Parameters:
Returns:
Raises:
SynAugment.mbb
_match_autocorrelation
rescaling used by :meth:augment. Recombining a source’s own trend and
seasonal components with bootstrapped remainder blocks already anchors
the result to that source; re-pinning mean and standard deviation would
distort the remainder variability.
Classical decomposition and moving-block sampling execute in native
Rust. Seed determinism is stable within this native path.
NaNs are interpolated before decomposition. Series without a finite
observation or with fewer than four observations are skipped with a
logged warning; at least one series must be usable. Additional
input columns are copied unchanged from each source series. The
effective block length, including an explicitly supplied
block_size, is capped per source series at
max(2, len(series) // 3). This keeps multiple remainder blocks in
play for short inputs; request a smaller value when the exact block
length matters.
An explicit period requires at least two cycles per source. Shorter
sources use nonseasonal decomposition and are listed in a logged warning.
Infinite values reject the call with the offending series ID; NaNs
follow the interpolation/skip policy above.
Parameters:
Returns:
Raises:
SynAugment.dba
_match_autocorrelation. With the default
scale="reference", inputs are z-normalized for alignment and the
barycenter is mapped to the reference mean and standard deviation. That
is explicit reference anchoring, not the :meth:augment pinning path.
scale="none" averages raw values for panels already sharing scale.
Plain DBA is deterministic, so each requested copy randomizes the
reference and neighbor weights to create distinct augmentations.
Additional input columns are copied unchanged from the reference
series; DBA only barycenters the target column.
Copies share their initial alignment paths and refine in parallel in
native Rust. At most eight alignments/copies execute concurrently.
Parent storage per alignment, cached paths per copy and returned copies
per reference have separate 64 MiB limits; excessive requests raise
ValueError. Interrupts are checked
between work chunks. Seed
determinism is stable within this native path.
NaNs are interpolated; entirely missing sources are skipped with a
warning. Infinite values reject the call with the offending series ID.
Reference scaling preserves zero scale for constant sources, producing
constant copies. Sources with standard deviation below 1e-8 are listed
in a warning because their copies may add little or no variation.
Parameters:
Returns:
Raises:

