Search for Motifs
find_motif(.mp, ...) # S3 method for MatrixProfile find_motif( .mp, data, n_motifs = 3, n_neighbors = 10, radius = 3, exclusion_zone = NULL, ... ) # S3 method for MultiMatrixProfile find_motif( .mp, data, n_motifs = 3, mode = c("guided", "unconstrained"), n_bit = 4, exclusion_zone = NULL, n_dim = NULL, ... ) # S3 method for PMP find_motif( .mp, data, n_motifs = 3, n_neighbors = 10, radius = 3, exclusion_zone = NULL, ... )
.mp | a |
---|---|
... | further arguments to be passed to class specific function. |
data | the data used to build the Matrix Profile, if not embedded. |
n_motifs | an |
n_neighbors | an |
radius | an |
exclusion_zone | if a |
mode | a |
n_bit | an |
n_dim | an |
For class MatrixProfile
, returns the input .mp
object with a new name motif
.
It contains: motif_idx
, a list
of motif pairs found and motif_neighbor
a list
with
respective motif's neighbors.
For class MultiMatrixProfile
, returns the input .mp
object with a new name motif
. It contains:
motif_idx, a
vectorof motifs found and
motif_dima
list` the dimensions where the motifs were found
For class PMP
, returns the input .mp
object with a new name motif
. It contains: motif_idx
, a list
of motif pairs found and motif_neighbor
a list
with respective motif's neighbors.
# Single dimension data w <- 50 data <- mp_gait_data mp <- tsmp(data, window_size = w, exclusion_zone = 1 / 4, verbose = 0) mp <- find_motif(mp) #> Error in UseMethod("find_motif", .mp): no applicable method for 'find_motif' applied to an object of class "list" # Multidimension data w <- mp_toy_data$sub_len data <- mp_toy_data$data[1:200, ] mp <- tsmp(data, window_size = w, mode = "mstomp", verbose = 0) #> tsmp Parsing data +1029ms #> tsmp Parsing type +1ms #> tsmp Register anytime exit point +0ms #> tsmp Computation +0ms #> tsmp params is null +0ms #> tsmp params is a list with par and window_size +1ms #> tsmp Parsing data +1ms #> tsmp Parsing type +1ms #> tsmp Register anytime exit point +0ms #> tsmp Computation +0ms #> tsmp params is null +0ms #> tsmp params is a list with par and window_size +1ms #> tsmp Parsing data +1ms #> tsmp Parsing type +1ms #> tsmp Register anytime exit point +0ms #> tsmp Computation +0ms #> tsmp params is null +0ms #> tsmp params is a list with par and window_size +1ms mp <- find_motif(mp) pan <- tsmp(mp_gait_data, window_size = 20:30, mode = "pmp") #> Error in binary_split(length(window_sizes)): could not find function "binary_split" mp <- find_motif(pan) #> Error in matrix_profile$pmp[[row]]: subscript out of bounds