johannfaouzi/pyts

A Python package for time series classification

What it solves

pyts is a Python package designed to make time series classification accessible. It provides a comprehensive set of tools for preprocessing, transforming, and classifying time series data, which often requires specialized algorithms compared to standard tabular data.

How it works

The library organizes its functionality into several specialized modules:

  • Approximation: Uses algorithms like Piecewise Aggregate Approximation (PAA) and Symbolic Aggregate approXimation (SAX) to simplify time series.
  • Transformation: Converts time series into feature sets (e.g., ROCKET, BOSS, WEASEL) so they can be used with standard machine learning classifiers.
  • Classification: Implements state-of-the-art classification algorithms specifically for time series, such as TimeSeriesForest and LearningShapelets.
  • Image Conversion: Transforms time series into images using techniques like Recurrence Plots and Gramian Angular Fields, allowing the use of computer vision models for analysis.
  • Metrics: Provides specialized distance measures like Dynamic Time Warping (DTW) to compare time series.
  • Preprocessing: Offers sample-wise preprocessing tools and interpolation for missing values.
  • Multivariate: Includes utilities to handle multivariate time series data.

Who it’s for

Data scientists and researchers who work with time series data and need a library that integrates well with the scikit-learn ecosystem for classification tasks.

Highlights

  • Scikit-learn compatible: Developed in line with the scikit-learn community standards.
  • Diverse Transformations: Supports converting time series to bags of words, images, or extracted features.
  • Multivariate Support: Dedicated tools for handling multivariate time series.
  • Integrated Datasets: Includes utilities to fetch datasets from the UEA & UCR Time Series Classification Repository.

Related

  • Project
  • Project
  • Project
  • Project