as.matrixprofile: Convert a TSMP object into another if possible

Description Usage Arguments Value Functions Examples

View source: R/misc.R

Description

The base Classes are MatrixProfile and MultiMatrixProfile, but as other functions are used, classes are pushed behind, since the last output normally is the most significant. If you want, for example, to plot the Matrix Profile from a Fluss object, you may use as.matrixprofile() to cast it back.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21

Arguments

.mp

a TSMP object.

Value

Returns the object with the new class, if possible.

Functions

Examples

1
2
3
4
5
6
7
8
9
w <- 50
data <- mp_gait_data
mp <- tsmp(data, window_size = w, exclusion_zone = 1 / 4, verbose = 0)
mp <- find_motif(mp)
class(mp) # first class will be "Motif"

plot(mp) # plots a motif plot

plot(as.matrixprofile(mp)) # plots a matrix profile plot

franzbischoff/tsmp documentation built on March 9, 2020, 6:01 a.m.