Real-time STOMP algorithm

stompi_update(.mp, new_data, history_size = FALSE)

Arguments

.mp

a TSMP object of class MatrixProfile.

new_data

new data to append to original data.

history_size

an int or FALSE. (Default is FALSE). Keep only this amount of data in the object. The value is for the data, not the matrix profile. Notice that the lmpand lpi will be inconsistent when repeatedly updating limiting the history size and thus will affect the mp and pi.

Value

Returns the input .mp updated with the new information.

Examples

mp <- tsmp(mp_toy_data$data[1:200, 1], window_size = 30, verbose = 0)
mpi <- stompi_update(mp, mp_toy_data$data[201:300, 1])
#> tsmp Parsing data +4488ms 
#> Error in 1:.mp$w: argument of length 0
mp <- tsmp(mp_toy_data$data[1:300, 1], window_size = 30, verbose = 0)
all.equal(mp, mpi, check.attributes = FALSE)
#> Error in all.equal.list(mp, mpi, check.attributes = FALSE): object 'mpi' not found