Code Monkey home page Code Monkey logo

tsmp's Introduction

README

Francisco Bischoff - 23 Oct 2018

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

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++, 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 using a random walk dataset

set.seed(2018)
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() 133.16s 40000 1000 1
stamp_par() 140.25s 40000 1000 8
stamp() 262.03s 40000 1000 1

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, not for AB-joins yet)
  • 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

Roadmap

  • 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.