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.

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 to MatrixProfile.

  • as.multimatrixprofile: Cast an object changed by another function back to MultiMatrixProfile.

  • as.pmp: Cast an object changed by another function back to PMP.

  • as.valmod: Cast an object changed by another function back to MultiMatrixProfile.

  • as.fluss: Cast an object changed by another function back to Fluss.

  • as.chain: Cast an object changed by another function back to Chain.

  • as.discord: Cast an object changed by another function back to Discord.

  • as.motif: Cast an object changed by another function back to Motif.

  • as.multimotif: Cast an object changed by another function back to MultiMotif.

  • as.arccount: Cast an object changed by another function back to ArcCount.

  • as.salient: Cast an object changed by another function back to Salient.

Examples


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"
class(mp) # first class will be "Motif"
#> [1] "list"

plot(mp) # plots a motif plot
#> Error in xy.coords(x, y, xlabel, ylabel, log): 'x' is a list, but does not have components 'x' and 'y'

plot(as.matrixprofile(mp)) # plots a matrix profile plot
#> Error in as.matrixprofile(mp): This object cannot be a `MatrixProfile`.
#
# TODO: Refactor
#