Learn R Programming

harbinger (version 1.2.767)

hmo_mp: Motif discovery using Matrix Profile

Description

Discovers repeated subsequences (motifs) using Matrix Profile methods as implemented in the tsmp package doi:10.32614/RJ-2020-021.

Usage

hmo_mp(mode = "stamp", w, qtd)

Value

hmo_mp object.

Arguments

mode

Character. Algorithm: one of "stomp", "stamp", "simple", "mstomp", "scrimp", "valmod", "pmp".

w

Integer. Subsequence window size.

qtd

Integer. Minimum number of occurrences to classify as a motif.

References

  • Yeh CCM, et al. (2016). Matrix Profile I/II: All-pairs similarity joins and scalable time series motifs/discrod discovery. IEEE ICDM.

  • Tavenard R, et al. tsmp: The Matrix Profile in R. The R Journal (2020). doi:10.32614/RJ-2020-021

Examples

Run this code
library(daltoolbox)

# Load motif example data
data(examples_motifs)

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

# Configure motif discovery via Matrix Profile
model <- hmo_mp("stamp", 4, 3)

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

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

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

Run the code above in your browser using DataLab