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),])
Run the code above in your browser using DataLab