pyts is a Python package dedicated to time series classification. It provides preprocessing and utility tools, along with implementations of various time series classification algorithms. The library maintains an active development status, with major versions often introducing new Python support and algorithms, currently at version 0.13.0.
pip install pytsVerified import paths — ran on the pinned version, not inferred.
This quickstart loads the 'GunPoint' dataset, initializes a `TimeSeriesForest` classifier, trains it on the training data, and evaluates its accuracy on the test set. This demonstrates a common workflow for time series classification using `pyts`.
Upgrade your Python interpreter to 3.8 or newer for pyts v0.11.0+, 3.9 or newer for pyts v0.12.0+, and 3.10 or newer for pyts v0.13.0+.
For the old `BagOfWords` functionality, use `from pyts.bag_of_words import WordExtractor` instead. If you want the new `BagOfWords` behavior, update your code to reflect its new parameters or expected output.
Review custom `pyts`-compatible estimators that directly inherited from `scikit-learn` mixins. Update them to use `pyts`'s own mixin classes or ensure compatibility with `pyts`'s internal mixin implementations.
Always install `pyts` in a clean virtual environment and allow `pip` to resolve the latest compatible versions of its dependencies. Check the official `pyts` documentation for the exact dependency requirements for your `pyts` version. `pip install pyts` should handle this for the latest version.
Run `pip install pyts` to install the library.
For the functionality of `BagOfWords` before v0.11.0, import `WordExtractor` instead: `from pyts.bag_of_words import WordExtractor`. If you intend to use the newer `BagOfWords` functionality, ensure your `pyts` version is 0.11.0 or newer.
If this error occurs after updating `pyts` to v0.12.0 or newer, verify that any custom classes or integrations are compatible with `pyts`'s new internal mixin structure. It may require updating the custom estimator's inheritance or attributes to align with how `pyts` now defines estimator types internally, rather than directly relying on `sklearn`'s private APIs. Ensure that `pyts` estimators are used as intended within `scikit-learn` pipelines, which are generally supported.