| as.matrixprofile {tsmp} | R Documentation |
Convert a TSMP object into another if possible
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
as.matrixprofile(.mp)
as.multimatrixprofile(.mp)
as.pmp(.mp)
as.valmod(.mp)
as.fluss(.mp)
as.chain(.mp)
as.discord(.mp)
as.motif(.mp)
as.multimotif(.mp)
as.arccount(.mp)
as.salient(.mp)
Arguments
.mp |
a TSMP object. |
Value
Returns the object with the new class, if possible.
Functions
-
as.matrixprofile(): Cast an object changed by another function back toMatrixProfile. -
as.multimatrixprofile(): Cast an object changed by another function back toMultiMatrixProfile. -
as.pmp(): Cast an object changed by another function back toPMP. -
as.valmod(): Cast an object changed by another function back toMultiMatrixProfile. -
as.fluss(): Cast an object changed by another function back toFluss. -
as.chain(): Cast an object changed by another function back toChain. -
as.discord(): Cast an object changed by another function back toDiscord. -
as.motif(): Cast an object changed by another function back toMotif. -
as.multimotif(): Cast an object changed by another function back toMultiMotif. -
as.arccount(): Cast an object changed by another function back toArcCount. -
as.salient(): Cast an object changed by another function back toSalient.
Examples
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