← All 31 animations

Univariate SSA

Univariate SSA

Property Value
Method SSA
Input mode univariate
Trend shape (96,)
Notebook execution ran
Reconstruction RMSE 0.00000000

Notebook example metric: root mean square of input - (trend + season + residual) over all samples and channels. This checks additive bookkeeping; it is not a forecast error or a component-recovery score. The separate teaching input and intermediate arrays for the animation are linked below.

How it works

Method maturity: maintained. Implementation: native-backed.

SSA decomposes a lag matrix and maps its grouped modes back to time-domain components.

SSA: Embed overlapping windows; Factor the trajectory matrix; Average each anti-diagonal; Group trend and season

Deterministic synthetic teaching signal; not a benchmark.

Open GIF · Static PNG · Source arrays (NPZ) · Trace metadata

Follow the four steps

1. Embed overlapping windows

Slide an L-sample window across the series. Put each window in a column. Repeated observations lie on anti-diagonals, which is the Hankel structure used by SSA.

2. Factor the trajectory matrix

Compute X = U diag(s) V^T. Each singular triplet gives one rank-one matrix. Retaining only a chosen number of modes determines which matrix structure can enter subsequent grouping.

3. Average each anti-diagonal

A rank-one matrix need not itself be Hankel. Average its anti-diagonals to turn its repeated time-index estimates back into one time-domain reconstructed component.

4. Group trend and season

This example uses DeTime's primary-period frequency heuristic. Low-frequency modes are assigned to trend and modes near 1/period to season, with documented fallbacks if a group is empty. Residual is the observed input minus those two groups. Explicit component-index lists can replace this automatic grouping.

Parameters that change the result

Parameter Effect on the computation
window Embedding length L; changes the temporal scale and matrix dimensions.
rank Number of singular modes available for grouping; more modes can retain both signal structure and noise.
primary_period Target period for the frequency-based seasonal grouping heuristic.
trend_components / season_components Optional zero-based mode indices that explicitly define the groups.
season_freq_tol_ratio / trend_freq_threshold Control the frequency bands used by automatic grouping.

What this animation computes

The trajectory matrix, exact SVD, reconstructed modes, and grouped outputs are computed from the source algorithm. Checks compare trace modes and final groups with the configured Python implementation. The animation explains construction order, not solver wall-clock execution.

Interpretation

  • The labels trend and season come from a grouping rule; singular-value order alone does not establish physical meaning.
  • Changing window, rank, or grouping can change components even when additive reconstruction remains exact.
  • The animation uses backend='python', speed_mode='exact'. Native or randomized fast paths are separate numerical execution choices.
  • This is an offline decomposition. Forecasting features must be recomputed using only observations available at each forecast origin.

Try the method

Use this configuration with DecompositionConfig and decompose. The animation generator supplies the teaching input and records intermediate arrays.

{
  "method": "SSA",
  "backend": "python",
  "speed_mode": "exact",
  "params": {
    "window": 36,
    "rank": 8,
    "primary_period": 24
  }
}

See the configuration reference for the full interface and optional dependencies.

Sources and reproduction

Regenerate this animation with python scripts/generate_method_animations.py --methods SSA. The reproduction guide explains the environment, numerical checks, coverage manifest, and how to inspect the stored arrays.

Code

case = CASES["SSA"]
run_gallery_case("SSA")

Output

Decomposition Plot

SSA decomposition