Discord discovery using Matrix Profile doi:10.32614/RJ-2020-021
Examples
library(daltoolbox)
#loading the example database
data(examples_motifs)
#Using sequence example
dataset <- examples_motifs$simple
head(dataset)
#> serie event
#> 1 1.0000000 FALSE
#> 2 0.9939124 FALSE
#> 3 0.9275826 FALSE
#> 4 0.8066889 FALSE
#> 5 0.6403023 FALSE
#> 6 0.4403224 FALSE
# setting up discord discovery method
model <- hdis_mp("stamp", 4, 3)
# fitting the model
model <- fit(model, dataset$serie)
detection <- detect(model, dataset$serie)
#> Finished in 0.03 secs
# filtering detected events
print(detection[(detection$event),])
#> idx event type seq seqlen
#> 47 47 TRUE motif 1 4
#> 53 53 TRUE motif 1 4
#> 72 72 TRUE motif 1 4
#> 78 78 TRUE motif 1 4