Discovers unusual subsequences (discords) as local maxima of the canonical
Keogh Matrix Profile (STOMP) separated by the exclusion zone round(w / 2),
enhanced with the Complexity Annotation Vector (Batista & Keogh 2014;
Dau & Keogh 2017) and adaptive statistical thresholding via har_outliers
when qtd = NULL (or Keogh Top-K discords when qtd = k).
References
Keogh E, Lin J, Fu A (2005). HOT SAX: Efficiently Finding the Most Unusual Time Series Subsequence. IEEE ICDM 2005. doi:10.1109/ICDM.2005.79
Batista GEAPA, Keogh EJ, Tataw OM, de Souza VMA (2014). CID: an efficient complexity-invariant distance for time series. DMKD 28(3):634-669.
Yeh CCM, Zhu Y, Ulanova L, Begum N, Ding Y, Dau HA, Silva DF, Mueen A, Keogh E (2016). Matrix Profile I: All Pairs Similarity Joins for Time Series. IEEE ICDM 2016. doi:10.1109/ICDM.2016.0179
Zhu Y, Zimmerman Z, Senobari NS, Yeh CCM, Funning G, Mueen A, Brisk P, Keogh E (2016). Matrix Profile II: STOMP. IEEE ICDM 2016. doi:10.1109/ICDM.2016.0085
Dau HA, Keogh E (2017). Matrix Profile V: A Generic Technique to Incorporate Domain Knowledge into Motif Discovery. ACM SIGKDD 2017. doi:10.1145/3097983.3097993
Examples
library(daltoolbox)
# Load anomaly example data
data(examples_anomalies)
# Use a simple example
dataset <- examples_anomalies$simple
head(dataset)
#> serie event
#> 1 1.0000000 FALSE
#> 2 0.9689124 FALSE
#> 3 0.8775826 FALSE
#> 4 0.7316889 FALSE
#> 5 0.5403023 FALSE
#> 6 0.3153224 FALSE
# Configure discord discovery via Matrix Profile
model <- hdis_mp(w = 10)
# Fit the model
model <- fit(model, dataset$serie)
# Run detection
detection <- detect(model, dataset$serie)
# Show detected discords
print(detection[(detection$event),])
#> idx event type seq seqlen
#> 47 47 TRUE discord 1 10