This is a supporting page of the paper

Enumeration of Time Series Motifs of All Lengths


Abdullah Mueen
The paper is Here and the presentation slides are Here.

Time Series Motifs are repetitions in time series that are too similar to happen at random and thus, provides evidence of low-noise segments of the time series. Finding repetitions for a wide range of lengths is a challenging problem and has not been addressed so far where
the motifs are the most correlated segments of all the other segments of the same length. The trivial way to enumerate the motifs of all lengths can be to repeatedly use the best motif discovery algorithm for fixed length. In this work we have shown an algorithm that finds the best repetitions/motifs for the range of lengths in a time series and it runs faster than the smartest available solution. The following figure describes a set of motifs found in an EEG signal shown at the top.



The pseudocode in the paper has an error in line 4. Instead of (m+1)/m it should be m/(m+1). Similarly in lines 13 and 18, it should be (j-1)/j instead of j/(j-1).

Code and Executables 

We have a C# code and a Matlab wrapped code to plot the motifs. Please email me for the passwords.


1. C# code: The  code is very easily convertible to c++ if you want to. There is no external dependency to platform specific libraries and there  only two files.

2.   Matlab wrapped code: Produces plots as shown in the paper. It needs windows platform to run the .exe file.


Spreadsheet of Experimental Results 

We have compiled results of all the experiments in a spreadsheet All time measurements are in seconds


  • For scalability experiments, 
    • EOG data
    • EEG data 
    • RW data is generated by the following two lines in matlab : R = randn(1,10000); RW = cumsum(R);

Context Recognition Data

The dataset has been taken from here.

The time series used for the paper is Environment:
SoundPressure:Modest. There are multiple scenarios performed by multiple users.
Scenarios contain some common motions such as Walking in the Lobby or in the Corridor, etc. We randomly concatenated different scenarios from different users and enumerated motifs. We expected that motifs will be from identical scenarios and we found motifs with 91% precision.


JustDance Data

The data is here.

The dataset is taken from the following paper and we acknowledge the generous support of H. Pohl for providing the data. The choreography retrieval is a special case of more general state sequence reconstruction problem. We aimed at seeing if the motifs are generated from the same motion or motion-transitions. Wr achieved 86.5% precision.

H. Pohl and A. Hadjakos. Dance pattern recognition using dynamic time warping. In SMC 2010 Proceedings, pages 183–190, 2010.

EPG Data
The data is hereMotifs of different lengths show the hierarchy of patterns. insect

This page is created by -
Abdullah Mueen
Department of Computer Science
University of New Mexico