Francisco Bischoff - 05 Jun 2019

Time Series with Matrix Profile

Packagist lifecycle CRAN version CRAN Downloads

Build Dev
Linux x86_64 Build Status Build Status
OSX Build Status Build Status
Windows AppVeyor build status AppVeyor build status
Coverage codecov codecov


R Functions implementing UCR Matrix Profile Algorithm (

This package allows you to use the Matrix Profile concept as a toolkit.

This package provides:

# Basic workflow:
matrix <- tsmp(data, window_size = 30) %>%
  find_motif(n_motifs = 3) %>%

# SDTS still have a unique way to work:
model <- sdts_train(data, labels, windows)
result <- sdts_predict(model, data, round(mean(windows)))

Please refer to the User Manual for more details.

Please be welcome to suggest improvements.

Performance on an Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz using a random walk dataset

data <- cumsum(sample(c(-1, 1), 40000, TRUE))
Elapsed Time Data size Window size Threads
stomp_par() 52.72s 40000 1000 8
scrimp() 92.44s 40000 1000 1
stomp() 136.01s 40000 1000 1
stamp_par() 140.25s 40000 1000 8
stamp() 262.03s 40000 1000 1


# Install the released version from CRAN

# Or the development version from GitHub:
# install.packages("devtools")

Currently available Features


Other projects with Matrix Profile

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project, you agree to abide by its terms.