I'd like to use a custom annotation vector (av) for a matrix profile (mp)
produced using the tsmp package, but I am unsure how to amend said profile
produced by e.g. the compute function.

I note that the package provides some functions to do this for "standard"
cases, such as av_complexity, av_hardlimit_artifact etc. and then av_apply,
but I want to apply a custom av. I have tried directly replacing the mp in
the results produced by compute, i.e.

result <- compute( data , ... )
result$mp <- my_av_mp

but this doesn't work as I get the following error

Error in `[.data.frame`(matrix_profile$mp, min_idx) :
undefined columns selected

Trying

result$mp[,1] <- my_av_mp

doesn't give an error, but when I try to use the amended result further,
i.e.

motif_results <- find_motif( result , n_motifs = 5 , ... )

I get the error

Error in apply(.mp$mp, 2, which.min) : dim(X) must have a positive length

What is the correct way to apply a custom av with the tsmp package?

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to