| hanr_wavelet | R Documentation |
Multiresolution decomposition via wavelets; anomalies are flagged where aggregated wavelet detail coefficients indicate unusual energy.
hanr_wavelet(filter = "haar")
filter |
Character. Available wavelet filters: |
The series is decomposed with a native Maximal Overlap Discrete Wavelet
Transform (MODWT, Percival & Walden, 2000) aligned with tspredit /
pytspredit.wavelet, and detail bands are aggregated to compute a magnitude
signal thresholded using harutils().
hanr_wavelet object
Mallat S (1989). A theory for multiresolution signal decomposition: The wavelet representation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 11(7):674-693.
Percival DB, Walden AT (2000). Wavelet Methods for Time Series Analysis. Cambridge University Press.
library(daltoolbox)
# Load anomaly example data
data(examples_anomalies)
# Use a simple example
dataset <- examples_anomalies$simple
head(dataset)
# Configure wavelet-based anomaly detector
model <- hanr_wavelet()
# Fit the model
model <- fit(model, dataset$serie)
# Run detection
detection <- detect(model, dataset$serie)
# Show detected anomalies
print(detection[(detection$event),])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.