ROCKET
· MINIROCKET
· HYDRA
HYDRA: Competing convolutional kernels for fast and accurate time series classification
Data Mining and Knowledge Discovery / arXiv:2203.13652 (preprint)
We demonstrate a simple connection between dictionary methods for time series classification, which involve extracting and counting symbolic patterns in time series, and methods based on transforming input time series using convolutional kernels, namely ROCKET and its variants. We show that by adjusting a single hyperparameter it is possible to move by degrees between models resembling dictionary methods and models resembling ROCKET. We present HYDRA, a simple, fast, and accurate dictionary method for time series classification using competing convolutional kernels, combining key aspects of both ROCKET and conventional dictionary methods. HYDRA is faster and more accurate than the most accurate existing dictionary methods, and can be combined with ROCKET and its variants to further improve the accuracy of these methods.
Please cite as:
@article{dempster_etal_2023,
author = {Dempster, Angus and Schmidt, Daniel F and Webb, Geoffrey I},
title = {Hydra: Competing Convolutional Kernels for Fast and Accurate Time Series Classification},
year = {2023},
journal = {Data Mining and Knowledge Discovery},
volume = {37},
pages = {1779--1805},
}
- Python
- PyTorch
- NumPy
- scikit-learn (or similar)
† experimental
* Hydra + SGD for larger datasets (i.e., more than approx. 10,000 training examples)
from hydra import Hydra, SparseScaler
from sklearn.linear_model import RidgeClassifierCV
[...] # load data (torch.FloatTensor, shape = (num_examples, 1, length))
transform = Hydra(X_training.shape[-1])
X_training_transform = transform(X_training)
X_test_transform = transform(X_test)
scaler = SparseScaler()
X_training_transform = scaler.fit_transform(X_training_transform)
X_test_transform = scaler.transform(X_test_transform)
classifier = RidgeClassifierCV(alphas = np.logspace(-3, 3, 10))
classifier.fit(X_training_transform, Y_training)
predictions = classifier.predict(X_test_transform)
We thank Professor Eamonn Keogh and all the people who have contributed to the UCR time series classification archive. Figures in our paper showing mean ranks were produced using code from Ismail Fawaz et al. (2019).
🐲