w <- mp_toy_data$sub_len
ref_data <- mp_toy_data$data[, 1]
query_data <- mp_toy_data$data[, 1]
d_size <- length(ref_data)
q_size <- length(query_data)
pre <- tsmp:::mass_pre(ref_data, query_data, w)
dp <- list()
for (i in 1:(d_size - w + 1)) {
dp[[i]] <- tsmp:::mass_v3(
query_data[i:(i - 1 + w)], ref_data,
pre$window_size, pre$data_size, pre$data_mean, pre$data_sd,
pre$query_mean[i], pre$query_sd[i]
)
}
Run the code above in your browser using DataLab