--- id: pyts version: "0.13.0" license: new BSD license_treatment: permissive maintenance: aging --- # pyts — A python package for time series classification License: permissive · Maintenance: aging · Downloads: 131.7K/mo ## What it is and what it does Pyts is a scikit-learn-style library for time series classification that implements state-of-the-art algorithms and provides a suite of preprocessing and transformation tools. It bridges the gap between raw temporal data and machine learning by offering multiple ways to represent time series—from symbolic approximations (Piecewise Aggregate Approximation, Symbolic Aggregate approXimation) to image-based encodings (Recurrence Plot, Gramian Angular Field) to bag-of-words models. The library also includes specialized classifiers like SAXVSM, BOSSVS, Learning Shapelets, and Time Series Forest, as well as time-series-specific metrics such as Dynamic Time Warping variants and the BOSS metric. The package is built on top of numpy, scipy, scikit-learn, joblib, and numba, inheriting their maturity and performance characteristics. It is designed for developers and researchers who need to classify temporal sequences—whether univariate or multivariate—without building these algorithms from scratch. The modular structure (approximation, bag_of_words, classification, decomposition, image, metrics, preprocessing, transformation) allows you to compose pipelines for custom workflows, and it includes utilities to fetch benchmark datasets from the UEA & UCR Time Series Classification Repository. Use it for: - Classify sensor time series (e.g., accelerometer data, ECG signals) using shapelet or bag-of-words approaches. - Transform raw time series into symbolic or image representations for use with standard classifiers. - Compute specialized distance metrics (Dynamic Time Warping) between temporal sequences for nearest-neighbor classification. - Preprocess multivariate time series (e.g., stock prices, weather data) sample-wise before feeding to downstream models. - Benchmark your own time series classifier against state-of-the-art algorithms using UCR/UEA datasets. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Pyts provides time series classification algorithms and preprocessing tools, including transformations like symbolic approximation, bag-of-words encoding, and image-based representations, along with specialized classifiers and metrics for temporal data. Yes, if you need time series classification and want a well-structured, scikit-learn-compatible library with multiple algorithms and transformations. The permissive license, low install friction, and established dependencies make it low-risk. However, the last release was in June 2023, so verify that the package's algorithms and dependencies align with your Python and library versions before committing to production use. ## Install pip install pyts uv add pyts poetry add pyts ## Installing pyts Before you install: Low friction install with a pure-Python wheel. Depends on five established scientific packages (numpy, scipy, scikit-learn, joblib, numba); all are widely available. Last release was in June 2023 and the repository remains active, though the package is marked as aging in maintenance status. License in practice: Licensed under new BSD (permissive), which allows commercial and private use with minimal restrictions—suitable for most projects without legal friction. Quickstart: pip install pyts from pyts.classification import SAXVSM from pyts.datasets import load_UCR X_train, X_test, y_train, y_test = load_UCR('GunPoint') clf = SAXVSM() clf.fit(X_train, y_train) clf.score(X_test, y_test) Requires Python >= 3.8 and working installations of numpy, scipy, scikit-learn, joblib, and numba; Numba in particular may require a C compiler on some systems. Verify before relying: - Specific performance benchmarks or accuracy comparisons against other time series classification libraries. - Whether the package is actively maintained beyond the June 2023 release or if recent commits represent only minor updates. - Real-world scalability limits for very long time series or high-dimensional multivariate data. ## Package facts - License: new BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 131.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags time series classification, temporal data machine learning, time series feature extraction, symbolic time series approximation, time series distance metrics, shapelet-based classification, time series preprocessing tools, time-series, classification, feature-extraction [View on SkillFed](https://skillfed.io/packages/pyts) · [View on PyPI](https://pypi.org/project/pyts/)