All Projects → target → Matrixprofile Ts

target / Matrixprofile Ts

Licence: apache-2.0
A Python library for detecting patterns and anomalies in massive datasets using the Matrix Profile

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Matrixprofile Ts

Try
Dead simple CLI tool to try Python packages - It's never been easier! 📦
Stars: ✭ 588 (-5.31%)
Mutual labels:  pypi, pip
Pipx
Install and Run Python Applications in Isolated Environments
Stars: ✭ 4,398 (+608.21%)
Mutual labels:  pypi, pip
Py webauthn
A WebAuthn Python module.
Stars: ✭ 270 (-56.52%)
Mutual labels:  pypi, pip
allalgorithms-python
The All ▲lgorithms Python Library.
Stars: ✭ 31 (-95.01%)
Mutual labels:  pypi, pip
Sktime
A unified framework for machine learning with time series
Stars: ✭ 4,741 (+663.45%)
Mutual labels:  data-science, time-series
Data Describe
data⎰describe: Pythonic EDA Accelerator for Data Science
Stars: ✭ 269 (-56.68%)
Mutual labels:  data-science, pypi
Pycaret
An open-source, low-code machine learning library in Python
Stars: ✭ 4,594 (+639.77%)
Mutual labels:  data-science, time-series
pipyuan
pipyuan 内置了国内常用的 pip 源, 你可以快速设置想要的源
Stars: ✭ 30 (-95.17%)
Mutual labels:  pypi, pip
Data Science
Collection of useful data science topics along with code and articles
Stars: ✭ 315 (-49.28%)
Mutual labels:  data-science, time-series
Deltapy
DeltaPy - Tabular Data Augmentation (by @firmai)
Stars: ✭ 344 (-44.61%)
Mutual labels:  data-science, time-series
pipsalabim
An assistant to guess your pip dependencies from your code, without using a requirements file.
Stars: ✭ 15 (-97.58%)
Mutual labels:  pypi, pip
Seglearn
Python module for machine learning time series:
Stars: ✭ 435 (-29.95%)
Mutual labels:  data-science, time-series
rfc-bibtex
A command line tool that creates bibtex entries for IETF RFCs and Internet Drafts.
Stars: ✭ 43 (-93.08%)
Mutual labels:  pypi, pip
Elki
ELKI Data Mining Toolkit
Stars: ✭ 613 (-1.29%)
Mutual labels:  data-science, time-series
poetry-setup
Generate setup.py (setuptools) from pyproject.toml (poetry)
Stars: ✭ 44 (-92.91%)
Mutual labels:  pypi, pip
Underscore.py
Python port of underscore.js
Stars: ✭ 277 (-55.39%)
Mutual labels:  pypi, pip
pipx
Install and Run Python Applications in Isolated Environments
Stars: ✭ 5,698 (+817.55%)
Mutual labels:  pypi, pip
pip-download
A wrapper for pip download in offline scenario.
Stars: ✭ 22 (-96.46%)
Mutual labels:  pypi, pip
Pip Upgrader
An interactive pip requirements upgrader. It also updates the version in your requirements.txt file.
Stars: ✭ 340 (-45.25%)
Mutual labels:  pypi, pip
Piprot
How rotten are your requirements?
Stars: ✭ 409 (-34.14%)
Mutual labels:  pypi, pip

PyPI version Build Status Downloads Downloads/Week License

matrixprofile-ts

matrixprofile-ts is a Python 2 and 3 library for evaluating time series data using the Matrix Profile algorithms developed by the Keogh and Mueen research groups at UC-Riverside and the University of New Mexico. Current implementations include MASS, STMP, STAMP, STAMPI, STOMP, SCRIMP++, and FLUSS.

Read the Target blog post here.

Further academic description can be found here.

The PyPi page for matrixprofile-ts is here

Contents

Installation

Major releases of matrixprofile-ts are available on the Python Package Index:

pip install matrixprofile-ts

Details about each release can be found here.

Quick start

>>> from matrixprofile import *
>>> import numpy as np
>>> a = np.array([0.0,1.0,1.0,0.0,0.0,1.0,1.0,0.0,0.0,1.0,1.0,0.0])
>>> matrixProfile.stomp(a,4)
(array([0., 0., 0., 0., 0., 0., 0., 0., 0.]), array([4., 5., 6., 7., 0., 1., 2., 3., 0.]))

Note that SCRIMP++ is highly recommended for calculating the Matrix Profile due to its speed and anytime ability.

Examples

Jupyter notebooks containing various examples of how to use matrixprofile-ts can be found under docs/examples.

As a basic introduction, we can take a synthetic signal and use STOMP to calculate the corresponding Matrix Profile (this is the same synthetic signal as in the Golang Matrix Profile library). Code for this example can be found here

datamp

There are several items of note:

  • The Matrix Profile value jumps at each phase change. High Matrix Profile values are associated with "discords": time series behavior that hasn't been observed before.

  • Repeated patterns in the data (or "motifs") lead to low Matrix Profile values.

We can introduce an anomaly to the end of the time series and use STAMPI to detect it

datampanom

The Matrix Profile has spiked in value, highlighting the (potential) presence of a new behavior. Note that Matrix Profile anomaly detection capabilities will depend on the nature of the data, as well as the selected subquery length parameter. Like all good algorithms, it's important to try out different parameter values.

Algorithm Comparison

This section shows the matrix profile algorithms and the time it takes to compute them. It also discusses use cases on when to use one versus another. The timing comparison is based on the synthetic sample data set to show run time speed.

For a more comprehensive runtime comparison, please review the notebook docs/examples/Algorithm Comparison.ipynb.

All time comparisons were ran on a 4 core 2.8 ghz processor with 16 GB of memory. The operating system used was Ubuntu 18.04LTS 64 bit.

Algorithm Time to Complete Description
STAMP 310 ms ± 1.73 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) STAMP is an anytime algorithm that lets you sample the data set to get an approximate solution. Our implementation provides you with the option to specify the sampling size in percent format.
STOMP 79.8 ms ± 473 µs per loop (mean ± std. dev. of 7 runs, 10 loops each) STOMP computes an exact solution in a very efficient manner. When you have a historic time series that you would like to examine, STOMP is typically the quickest at giving an exact solution.
SCRIMP++ 59 ms ± 278 µs per loop (mean ± std. dev. of 7 runs, 10 loops each) SCRIMP++ merges the concepts of STAMP and STOMP together to provide an anytime algorithm that enables "interactive analysis speed". Essentially, it provides an exact or approximate solution in a very timely manner. Our implementation allows you to specify the max number of seconds you are willing to wait for a solution to obtain an approximate solution. If you are wanting the exact solution, it is able to provide that as well. The original authors of this algorithm suggest that SCRIMP++ can be used in all use cases.

Matrix Profile in Other Languages

Contact

Citations

  1. Chin-Chia Michael Yeh, Yan Zhu, Liudmila Ulanova, Nurjahan Begum, Yifei Ding, Hoang Anh Dau, Diego Furtado Silva, Abdullah Mueen, Eamonn Keogh (2016). Matrix Profile I: All Pairs Similarity Joins for Time Series: A Unifying View that Includes Motifs, Discords and Shapelets. IEEE ICDM 2016

  2. Matrix Profile II: Exploiting a Novel Algorithm and GPUs to break the one Hundred Million Barrier for Time Series Motifs and Joins. Yan Zhu, Zachary Zimmerman, Nader Shakibay Senobari, Chin-Chia Michael Yeh, Gareth Funning, Abdullah Mueen, Philip Berisk and Eamonn Keogh (2016). EEE ICDM 2016

  3. Matrix Profile V: A Generic Technique to Incorporate Domain Knowledge into Motif Discovery. Hoang Anh Dau and Eamonn Keogh. KDD'17, Halifax, Canada.

  4. Matrix Profile XI: SCRIMP++: Time Series Motif Discovery at Interactive Speed. Yan Zhu, Chin-Chia Michael Yeh, Zachary Zimmerman, Kaveh Kamgar and Eamonn Keogh, ICDM 2018.

  5. Matrix Profile VIII: Domain Agnostic Online Semantic Segmentation at Superhuman Performance Levels. Shaghayegh Gharghabi, Yifei Ding, Chin-Chia Michael Yeh, Kaveh Kamgar, Liudmila Ulanova, and Eamonn Keogh. ICDM 2017.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].