Our code is embedded within the Weka framework and the zip file contains all the necessary source code. It is also included in a Netbeans project, so you should be able to load this in directly. There is a helper class called ShapeletExamples (in the package examples) to illustrate the usage. The code includes classes for:

  • A shapelet tree algorithm based on that proposed in [1].
  • A shapelet transform algorithm as described in [4] that can use any one of four shapelet similarity measures.
  • A class to reproduce all the experiments described in [4]
  • Extended shapelet transforms that take advantage of the distance speed ups proposed in [1,2]

The code is here ShapeletTimeSeriesClassification.zip (ZIP, 18Mb). The zip file is password protected. To get the password, please read the points below, and if you agree to them, email Tony (ajb@uea.ac.uk),

  • Do not share the password with others.
  • The classes we have added to the weka toolkit are released under the GNU General Public Usage licence
  • Do not modify any of our classes. If you want to alter the algorithm, please extend one of our classes or use the code as a basis for your own class. If you want to add code to the release please get in touch.
  • If you are a postgraduate student/post-doc, you must discuss this with your supervisor first and CC him/her when requesting the password.
  • If you use the code, please reference [4] below.

To run the code related to [4] in the class DMKD_2013, you will need to change the variable userPath to where you have stored the data. The code assumes the data is in ARFF format. All our problems are in this format, but you will have to convert the UCR sets yourself, since we cannot distribute their data. Please note the UCR shapelet code is available from here. Please note that due to minor implementation changes this code will generate results slightly different to those reported in [4] see Shapelet results.

References

[1] Ye, L and Keogh, E.,  Time series shapelets: a new primitive for data mining Proceedings of the 15th ACM SIGKDD international conference on Knowledge discovery and data mining, 2009.

[2]Mueen, A, Keogh, E and Young, N, Logical-shapelets: An expressive primitive for time series classification Proceedings of the 17th ACM SIGKDD international conference on Knowledge discovery and data mining, 2011.

[3] Rakthanmanon, T ,  Campana, b, Mueen, a, Batista, g, Westover, m, Zhu, Q , Zakaria, Keogh, E. Searching and mining trillions of time series subsequences under dynamic time warping. Proceedings of the 18th ACM SIGKDD international conference on Knowledge discovery and data mining

[4] Hills, J, Lines, J, Baranauskas, E, Mapp, J, and Bagnall, A.,  Time Series Classification with Shapelets,  Journal of Data Mining and Knowledge Discovery. online first preprint.pdf, 2013.