Learn R Programming

⚠️There's a newer version (0.4.15) of this package.Take me there.

README

Francisco Bischoff - 10 Sep 2018

Time Series with Matrix Profile

BuildDev
Linux x86_64
OSX
Windows
Coverage

Overview

R Functions implementing UCR Matrix Profile Algorithm (http://www.cs.ucr.edu/~eamonn/MatrixProfile.html).

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

This package provides:

  • Algorithms to build a Matrix Profile: STAMP, STOMP, SCRIMP (experimental), SIMPLE and MSTOMP.
  • Algorithms for MOTIF search for Unidimensional and Multidimensional Matrix Profiles.
  • Algorithm for Chains search for Unidimensional Matrix Profile.
  • Algorithms for Semantic Segmentation (FLUSS) and Weakly Labeled data (SDTS).
  • Algorithm for Salient Subsections detection allowing MDS plotting.
  • Basic plotting for all outputs generated here.
  • Sequencial workflow, see below.
# Basic workflow:
matrix <- tsmp(data, window_size = 30) %>% find_motif(n_motifs = 3) %>% plot()

# 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

Elapsed TimeData sizeWindow sizeCores
stomp_par()45.17s550001508
stomp()76.68s550001501
mstomp_par()113.03s550001508
mstomp()238.81s550001501
stamp_par()852.11s550001508
stamp()2862.79s550001501

Installation

# Install the released version from CRAN
install.packages("tsmp")

# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github("franzbischoff/tsmp")

Currently available Features

  • STAMP (single and multi-thread versions)
  • STOMP (single and multi-thread versions)
  • SCRIMP (single-thread, still experimental)
  • Time Series Chains
  • Multivariate STOMP (mSTOMP)
  • Multivariate MOTIF Search (from mSTOMP)
  • Salient Subsequences search for Multidimensional Space
  • Scalable Dictionary learning for Time Series (SDTS) prediction
  • FLUSS (Fast Low-cost Unipotent Semantic Segmentation)
  • SiMPle-Fast (Fast Similarity Matrix Profile for Music Analysis and Exploration)
  • Annotation vectors (e.g.: Stop-word MOTIF bias, Actionability bias)
  • FLUSS Arc Plot and SiMPle Arc Plot
  • Misc:
    • MASS v2.0
    • Fast moving average
    • Fast moving SD

Road map

  • MOTIFs under Uniform Scaling
  • Exact Detection of Variable Length Motifs
  • Profile-Based Shapelet Discovery
  • GPU-STOMP
  • Real-time version of previous algorithms (STAMPI, FLOSS, etc)
  • MASS Extensions (ADP, WQ, QwG)

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.

Copy Link

Version

Install

install.packages('tsmp')

Monthly Downloads

233

Version

0.3.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Francisco Bischoff

Last Published

September 10th, 2018

Functions in tsmp (0.3.1)

find_chains

Find Time Series Chains
mp_toy_data

Original data used in the mSTAMP demo
as.matrixprofile

Convert a TSMP object into another if possible
fluss_score

FLUSS - Prediction score calculation
mass

Calculates the distance profile using MASS algorithm
plot

Plot a TSMP object
plot_arcs

Plot arcs between indexes of a Profile Index
mp_gait_data

Original data used in the Time Series Chain demo
av_zerocrossing

Computes the annotation vector that favors number of zero crossing
mp_test_data

Original data used in the STDS demo
find_motif

Search for Motifs
fluss

Fast Low-cost Unipotent Semantic Segmentation (FLUSS)
fast_movavg

Fast implementation of moving average using filter
mstomp_par

Multivariate STOMP algorithm Parallel version
av_apply

Corrects the matrix profile using an annotation vector
sdts_train

Scalable Dictionary learning for Time Series (SDTS) training function
mass_pre

Precomputes several values used on MASS
mp_fluss_data

Original data used in the FLUSS paper
salient_subsequences

Retrieve salient subsequences from a dataset
scrimp

Anytime univariate SCRIMP algorithm (experimental)
sdts_predict

Scalable Dictionary learning for Time Series (SDTS) prediction function
simple_fast

Compute the join similarity for Sound data
stamp_par

Anytime univariate STAMP algorithm Parallel version
sdts_score

Computes the F-Score of a SDTS prediction
tsmp

Computes the Matrix Profile and Profile Index
stomp_par

Univariate STOMP algorithm
av_stop_word

Computes the annotation vector that suppresses stop-word motifs
fast_movsd

Fast implementation of moving standard deviation using filter
av_motion_artifact

Computes the annotation vector that suppresses motion artifacts
av_complexity

Computes the annotation vector that favors complexity
fluss_cac

FLUSS - Corrected Arc Counts
fluss_extract

FLUSS - Extract Segments
av_hardlimit_artifact

Computes the annotation vector that suppresses hard-limited artifacts