Skip to content

Wavelet Features

Wavelet analysis provides multi-resolution decomposition, capturing features at different time scales simultaneously.

Discrete Wavelet Transform (DWT)

Feature Names: dwt_approx_*, dwt_detail_*

Decomposition

\[ cA_j(k) = \sum_n x(n) \cdot \phi_{j,k}(n) \quad \text{(approximation)} \]
\[ cD_j(k) = \sum_n x(n) \cdot \psi_{j,k}(n) \quad \text{(detail)} \]

where: $$ \phi_{j,k}(n) = 2^{-j/2} \cdot \phi(2^{-j}n - k) \quad \text{(scaling function)} $$

\[ \psi_{j,k}(n) = 2^{-j/2} \cdot \psi(2^{-j}n - k) \quad \text{(wavelet function)} \]

Wavelets Used

Wavelet Properties
db4 (Daubechies-4) 4 vanishing moments, good general purpose
sym4 (Symlet-4) Near-symmetric version of db4
coif2 (Coiflet-2) Near-symmetric, 4 vanishing moments
dmey (Discrete Meyer) Smooth in frequency domain

Properties

  • Perfect reconstruction: Original = sum of all coefficients
  • Multi-resolution: Captures both local and global features
  • Compact support: Localized in both time and frequency

Why Useful

Wavelets capture changes at different time scales. A structural break might affect slow trends (approximation) or rapid fluctuations (details) differently.

Used by: wavelet_lstm, knn_wavelet, meta_stacking_7models


Wavelet Energy

Feature Names: wavelet_energy_level_*, wavelet_energy_ratio

Energy at Level j

\[ E_j = \sum_k |cD_j(k)|^2 \]

Energy Ratio

\[ R_j = \frac{E_j}{\sum_i E_i} \]

Properties

  • Total energy preserved (Parseval's theorem)
  • High detail energy: High-frequency dominated
  • High approximation energy: Low-frequency dominated

Why Useful

Energy redistribution across scales indicates structural changes. A break might shift energy from low to high frequencies or vice versa.

Used by: knn_wavelet, meta_stacking_7models


Wavelet Entropy

Feature Name: wavelet_entropy_diff

\[ H_w = -\sum_j p_j \cdot \log_2(p_j) \]

where: $$ p_j = \frac{E_j}{\sum_i E_i} $$

Interpretation

Value Meaning
High entropy Energy spread across scales
Low entropy Energy concentrated in few scales

Multi-Level Decomposition

flowchart LR
    A["📊 Original Signal"] --> B["🔊 cD1<br/>Highest frequency"]
    A --> C["🔉 cD2<br/>Medium-high frequency"]
    A --> D["🔈 cD3<br/>Medium-low frequency"]
    A --> E["📉 cA3<br/>Approximation<br/>(lowest frequencies)"]

    style A fill:#e1f5fe
    style B fill:#ffcdd2
    style C fill:#fff3e0
    style D fill:#e8f5e9
    style E fill:#e3f2fd

Each level halves the frequency band, providing multi-resolution analysis.

Reference: Daubechies, I. (1992). Ten Lectures on Wavelets. SIAM.