Skip to main content
QUICK REVIEW

[Paper Review] A tale of two toolkits, report the first: benchmarking time series classification algorithms for correctness and efficiency

Anthony Bagnall, Franz J. Király|arXiv (Cornell University)|Sep 12, 2019
Time Series Analysis and ForecastingComputer Science26 references7 citations
TL;DR

This paper benchmarks six time series classification (TSC) algorithms in the open-source Python toolkit sktime against their Java counterparts in tsml, demonstrating high accuracy equivalence and identifying significant efficiency differences. The key contribution is a comprehensive correctness and performance evaluation that validates sktime's implementations while highlighting optimization opportunities for both toolkits.

ABSTRACT

sktime is an open source, Python based, sklearn compatible toolkit for time series analysis developed by researchers at the University of East Anglia (UEA), University College London and the Alan Turing Institute. A key initial goal for sktime was to provide time series classification functionality equivalent to that available in a related java package, tsml, also developed at UEA. We describe the implementation of six such classifiers in sktime and compare them to their tsml equivalents. We demonstrate correctness through equivalence of accuracy on a range of standard test problems and compare the build time of the different implementations. We find that there is significant difference in accuracy on only one of the six algorithms we look at (Proximity Forest). This difference is causing us some pain in debugging. We found a much wider range of difference in efficiency. Again, this was not unexpected, but it does highlight ways both toolkits could be improved.

Motivation & Objective

  • To validate the correctness of time series classification (TSC) algorithms implemented in the sktime Python toolkit by comparing their accuracy to equivalent implementations in the established tsml Java toolkit.
  • To evaluate and compare the computational efficiency (build and prediction times) of sktime and tsml implementations across six TSC algorithms.
  • To identify discrepancies in accuracy and performance that could inform improvements in both sktime and tsml.
  • To support reproducibility and transparency in TSC research by providing a common, open-source framework for algorithm comparison.
  • To guide future development of sktime by identifying key areas for optimization and extension, including multivariate and unequal-length time series support.

Proposed method

  • Implementation of six TSC algorithms in sktime—Time Series Forest (TSF), RISE, BOSS, Shapelet Transform Classifier, ElasticEnsemble (EE), and Proximity Forest (PF)—using a scikit-learn compatible API.
  • Comparison of model accuracy on standard time series benchmark datasets between sktime and tsml implementations to validate correctness.
  • Measurement and analysis of training and prediction runtimes to assess computational efficiency across both toolkits.
  • Use of standardized data loading and evaluation pipelines via sktime's contrib module to ensure reproducibility of results.
  • Leveraging sktime's modular architecture, including transformers, distance measures, and ensemble pipelines, to implement and compose classifiers.
  • Evaluation of both direct implementations (e.g., tsf.py) and composite pipeline-based versions (e.g., via Pipeline and FeatureUnion) to assess performance trade-offs.

Experimental results

Research questions

  • RQ1Are the TSC algorithm implementations in sktime functionally equivalent to their tsml counterparts in terms of classification accuracy?
  • RQ2What are the performance differences in training and prediction efficiency between sktime and tsml implementations?
  • RQ3Why does the composite pipeline-based implementation of Time Series Forest in sktime show significantly slower performance than the direct implementation?
  • RQ4Can the efficiency of RISE and BOSS in sktime be improved through algorithmic or implementation optimizations?
  • RQ5How do ensemble methods like ElasticEnsemble and Proximity Forest compare in accuracy and speed across both toolkits?

Key findings

  • The accuracy of all six TSC algorithms in sktime is equivalent to their tsml counterparts on standard benchmark datasets, with the exception of Proximity Forest, which shows a notable accuracy discrepancy.
  • Proximity Forest exhibits a significant accuracy difference between sktime and tsml, indicating a potential bug or implementation inconsistency requiring further debugging.
  • Large differences in efficiency were observed across all algorithms, with sktime implementations generally being slower than tsml, especially in composite pipeline configurations.
  • The composite pipeline-based implementation of Time Series Forest in sktime is significantly slower than the direct implementation, suggesting inefficiencies in the pipeline composition or feature transformation pipeline.
  • Performance differences highlight opportunities for optimization in both sktime and tsml, particularly in RISE (frequency-based) and BOSS (dictionary-based) implementations.
  • The study confirms that sktime provides a correct and interoperable foundation for TSC research, with clear paths for performance improvements and future algorithm integration.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.