tslearn-team/tslearn

The machine learning toolkit for time series analysis in Python

What it solves

It provides a comprehensive toolkit for performing machine learning on time series data, simplifying the process of formatting, preprocessing, and analyzing sequential data that often requires specialized distance metrics and algorithms.

How it works

The library expects time series datasets to be formatted as 3D numpy arrays (number of series, number of measurements, number of dimensions). It integrates seamlessly with scikit-learn, following the same API for model training and hyper-parameter tuning. It provides specialized utilities for handling variable-length time series and preprocessing steps like scaling and resampling.

Who it’s for

Data scientists and researchers who need to perform classification, clustering, and regression on time series data using Python.

Highlights

  • Scikit-learn Compatibility: Fully compatible with scikit-learn pipelines and utilities.
  • Diverse Task Support: Includes tools for classification (KNN, SVC), clustering (K-Means, KShape), and regression (SVR, MLP).
  • Specialized Metrics: Implements advanced distance metrics such as Dynamic Time Warping (DTW) and Global Alignment Kernel (GAK).
  • Data Utilities: Built-in support for UCR datasets, synthetic data generators, and conversion tools for other Python toolkits.

Related

  • Project
  • Project
  • Project
  • Project
  • Project