Git Product home page Git Product logo

tsmp4j's Introduction

Time Series with Matrix Profile in Java

This repository contains Matrix Profile algorithms implemented in Java. It is an attempt to port algorithms presented in tsmp.

The Matrix Profile, has the potential to revolutionize time series data mining because of its generality, versatility, simplicity and scalability. In particular, it has implications for time series motif discovery, time series joins, shapelet discovery (classification), density estimation, semantic segmentation, visualization, rule discovery, clustering etc.

This library includes the following algorithms to compute matrix profile:

Z-Normalized Euclidean Distance:

  1. STAMP - Anytime matrix profile algorithm
  2. STOMP - Scalable ordered matrix profile algorithm
  3. STOMPI - Incremental matrix profile algorithm
  4. SKIMP - Pan matrix profile algorithm
  5. MPX - Matrix profile algorithm not based on FFT
  6. MP-DIST (MASS2) - Fast distance search algorithm based on FFT
  7. ContrastProfile
  8. PanContrastProfile
  9. RelativeFrequencyMatrixProfile
  10. RelativeFrequencyContrastProfile
  11. FLUSS - timeseries segmentation based on matrix profile

Pure Euclidean Distance:

  1. AAMP

Additionally, this library includes extra algorithms not related to matrix profile:

  1. MWF - Domain agnostic window size finder
  2. trendSegmentR - Detection of linear trend changes for univariate time series
  3. TGUW - Tail-Greedy Unbalance Haar Wavelet decomposition

More algorithms will be added in the future.

Usage

All algorithms for matrix profile are built around RollingWindowStatistics object. It simply computes statistics required to run Matrix Profile algorithms on the fly, in a circular buffer manner, hence allows streaming data processing out of the box.

Streaming case

DoubleStream stream = ... // your data stream
var bs = 1024; // statistics buffer size
var w = 10; // window for MP algorithm
var stamp = new STAMP(w, bs);

stream.forEach(stamp::update); // it keeps statistics updated, not the matrix profile

var matrixProfile = stamp.get(); // execute MP algorithm for statistics collected

Single batch case

double[] data = ... // your data
var w = 10; // window for MP algorithm    
var matrixProfile = STAMP.of(data, w);

Please refer to tests for more examples.

tsmp4j's People

Contributors

eugene-kamenev avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

bruxless

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.