Discord discovery using SAX doi:10.1007/s10618-007-0064-z
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_sax(26, 3, 3)
# fitting the model
model <- fit(model, dataset$serie)
detection <- detect(model, dataset$serie)
# filtering detected events
print(detection[(detection$event),])
#> idx event type seq seqlen
#> 17 17 TRUE motif BCE 3
#> 21 21 TRUE motif IKM 3
#> 39 39 TRUE motif CDE 3
#> 43 43 TRUE motif GJL 3
#> 64 64 TRUE motif GHI 3
#> 68 68 TRUE motif LOS 3
#> 86 86 TRUE motif ONM 3
#> 90 90 TRUE motif MOP 3
#> 94 94 TRUE motif VXX 3