Welcome to convst documentation !

convst is a Python package dedicated to the Random Dilated Shapelet Transform (RDST).

Minimal example

The following code snippet illustrates the basic usage of convst:

from convst.classifiers import R_DST_Ridge
from convst.utils.dataset_utils import load_sktime_dataset_split

X_train, X_test, y_train, y_test, _ = load_sktime_dataset_split(
    'GunPoint', normalize=True
)

# First run may be slow due to numba compilations on the first call.
# Run small dataset like GunPoint if this is the first time you call RDST on your system.
# You can change n_shapelets to 1 to make this process faster.

rdst = R_DST_Ridge(n_shapelets=10_000).fit(X_train, y_train)

print("Accuracy Score for RDST : {}".format(rdst.score(X_test, y_test)))
  1. First we import the R_DST_Ridge class that containt a wrapper for R_DST using a Ridge classifier. We also import a data loading function

  2. Then we load the training and test sets by calling the load_sktime_dataset_split function.

  3. Finally we fit the model on the training set and evaluate its performance by computing the accuracy on the test set using the score function.

Note that for some problems, a non linear classifier such as a Random or Rotation Forest might be more interesting than the default linear classifier presentend here. We try ou best to follow the guidelines of sklearn to ensure compatibility with their numerous tools. For more information visit the Scikit-learn compatibility page.

Getting started

Information to install, test, and contribute to the package.

User Guide

The main documentation. This contains an in-depth description of all algorithms and how to apply them.

API Documentation

The exact API of all functions and classes, as given in the docstrings. The API documents expected types and allowed features for all functions, and all parameters available for the algorithms.

Examples

A set of examples illustrating the use of the different algorithms. It complements the User Guide.