Learn R Programming

harbinger (version 1.2.747)

hdis_sax: Discord discovery using SAX

Description

Discord discovery using SAX doi:10.1007/s10618-007-0064-z

Usage

hdis_sax(a, w, qtd = 2)

Value

hdis_sax object

Arguments

a

alphabet size

w

word size

qtd

number of occurrences to be classified as discords

References

  • Ogasawara, E., Salles, R., Porto, F., Pacitti, E. Event Detection in Time Series. 1st ed. Cham: Springer Nature Switzerland, 2025. doi:10.1007/978-3-031-75941-3

Examples

Run this code
library(daltoolbox)

# Load motif/discord example data
data(examples_motifs)

# Use a simple sequence example
dataset <- examples_motifs$simple
head(dataset)

# Configure discord discovery via SAX
model <- hdis_sax(26, 3, 3)

# Fit the model
model <- fit(model, dataset$serie)

# Run detection
detection <- detect(model, dataset$serie)

# Show detected discords
print(detection[(detection$event),])

Run the code above in your browser using DataLab