Table of Contents
Fetching ...

Castor: Competing shapelets for fast and accurate time series classification

Isak Samsten, Zed Lee

TL;DR

Castor introduces a competing-dilated shapelet transform for time series classification, organizing randomly sampled shapelets into groups that compete over temporal contexts to produce a rich, distance-based feature space. By incorporating both dilation and competition, plus optional first-order differences and z-normalization mix, Castor achieves state-of-the-art accuracy among shapelet-based methods and competitive performance relative to random-convolution and dictionary-based approaches. The paper provides a comprehensive ablation study to identify robust default hyperparameters, demonstrates linear scalability with data size, and offers an open-source implementation for reproducibility. Overall, Castor offers a fast, accurate, and interpretable alternative for time series classification with strong empirical evidence across a large benchmark.

Abstract

Shapelets are discriminative subsequences, originally embedded in shapelet-based decision trees but have since been extended to shapelet-based transformations. We propose Castor, a simple, efficient, and accurate time series classification algorithm that utilizes shapelets to transform time series. The transformation organizes shapelets into groups with varying dilation and allows the shapelets to compete over the time context to construct a diverse feature representation. By organizing the shapelets into groups, we enable the transformation to transition between levels of competition, resulting in methods that more closely resemble distance-based transformations or dictionary-based transformations. We demonstrate, through an extensive empirical investigation, that Castor yields transformations that result in classifiers that are significantly more accurate than several state-of-the-art classifiers. In an extensive ablation study, we examine the effect of choosing hyperparameters and suggest accurate and efficient default values.

Castor: Competing shapelets for fast and accurate time series classification

TL;DR

Castor introduces a competing-dilated shapelet transform for time series classification, organizing randomly sampled shapelets into groups that compete over temporal contexts to produce a rich, distance-based feature space. By incorporating both dilation and competition, plus optional first-order differences and z-normalization mix, Castor achieves state-of-the-art accuracy among shapelet-based methods and competitive performance relative to random-convolution and dictionary-based approaches. The paper provides a comprehensive ablation study to identify robust default hyperparameters, demonstrates linear scalability with data size, and offers an open-source implementation for reproducibility. Overall, Castor offers a fast, accurate, and interpretable alternative for time series classification with strong empirical evidence across a large benchmark.

Abstract

Shapelets are discriminative subsequences, originally embedded in shapelet-based decision trees but have since been extended to shapelet-based transformations. We propose Castor, a simple, efficient, and accurate time series classification algorithm that utilizes shapelets to transform time series. The transformation organizes shapelets into groups with varying dilation and allows the shapelets to compete over the time context to construct a diverse feature representation. By organizing the shapelets into groups, we enable the transformation to transition between levels of competition, resulting in methods that more closely resemble distance-based transformations or dictionary-based transformations. We demonstrate, through an extensive empirical investigation, that Castor yields transformations that result in classifiers that are significantly more accurate than several state-of-the-art classifiers. In an extensive ablation study, we examine the effect of choosing hyperparameters and suggest accurate and efficient default values.
Paper Structure (25 sections, 12 equations, 11 figures, 2 algorithms)

This paper contains 25 sections, 12 equations, 11 figures, 2 algorithms.

Figures (11)

  • Figure 1: Example of the dilated distance profile (blue) of a shapelet $S$ of length $3$ and a time series $T$ of length $5$ with dilation $d=2$ and padding $p=2$. We slide the shapelet over the time series, and at each timestep $i$, we compute the distance $D$ between the shapelet and the matching positions in the time series. Note that we scale the distance according to the number of timesteps that are not part of the padding, effectively assuming that the distance inside the padding is equal to the distance inside the time series.
  • Figure 2: A simplified representation of Castor. We have Castor parameters of size $g \times E \times k \times l = 5 \times 1 \times 4 \times 3$ computing the distance profile for every subsequence in $\hat{T}$ of length $m=4$ with padding $p=1$ and dilation $d=1$, resulting in the distance profiles of shape $5 \times 4 \times 4$. Inside each group and for a given column in the distance profiles, we compute three distance-based features ($3k$ in total as shown on the right side, see Section ref) for each shapelet based on the minimum and maximum distance and the distance threshold. Finally, we flatten the array.
  • Figure 3: Mean rank of Castor for 5-fold cross-validation, repeated five times across 112 datasets from the UCR time series repository. A lower rank indicates higher accuracy. Castor is significantly more accurate ($p<0.01$) than current state-of-the-art methods such as Hydra and Rocket, and is slightly better ranked than MultiRocket.
  • Figure 4: A sharpshooter plot comparing the performance of Castor against MultiRocket, Hydra, Rocket, and DST. Annotations in the left corners indicate the wins, losses, and ties for Castor, respectively.
  • Figure 5: Accuracy (left) and log-scaled training time (right) for all compared methods across all 112 datasets. Each black dot represents the accuracy for a method over a dataset, the red vertical bar indicates the mean, the red circle denotes the median, and the gray box illustrates the standard deviation.
  • ...and 6 more figures

Theorems & Definitions (9)

  • Definition 1
  • Definition 2
  • Definition 3
  • Definition 4
  • Definition 5
  • Definition 6
  • Definition 7
  • Definition 8
  • Definition 9