https://github.com/angus924/quant
QUANT: A Minimalist Interval Method for Time Series Classification
https://github.com/angus924/quant
interval scalable time-series-classification
Last synced: about 1 year ago
JSON representation
QUANT: A Minimalist Interval Method for Time Series Classification
- Host: GitHub
- URL: https://github.com/angus924/quant
- Owner: angus924
- License: gpl-3.0
- Created: 2023-07-31T21:49:33.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-11T00:02:05.000Z (over 1 year ago)
- Last Synced: 2025-03-27T02:11:19.287Z (about 1 year ago)
- Topics: interval, scalable, time-series-classification
- Language: Python
- Homepage:
- Size: 41 KB
- Stars: 22
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# QUANT
***QUANT: A Minimalist Interval Method for Time Series Classification***
[Data Mining and Knowledge Discovery](https://doi.org/10.1007/s10618-024-01036-9) / [arXiv:2308.00928](https://arxiv.org/abs/2308.00928) (preprint)
>
We show that it is possible to achieve the same accuracy, on average, as the most accurate existing interval methods for time series classification on a standard set of benchmark datasets using a single type of feature (quantiles), fixed intervals, and an 'off the shelf' classifier. This distillation of interval-based approaches represents a fast and accurate method for time series classification, achieving state-of-the-art accuracy on the expanded set of 142 datasets in the UCR archive with a total compute time (training and inference) of less than 15 minutes using a single CPU core.
Please cite as:
```bibtex
@article{dempster_etal_2024,
author = {Dempster, Angus and Schmidt, Daniel F and Webb, Geoffrey I},
title = {{QUANT}: A Minimalist Interval Method for Time Series Classification},
year = {2024},
journal = {Data Mining and Knowledge Discovery},
}
```
## Results
#### UCR Archive (142 Datasets, 30 Resamples)
* [Mean Accuracy + Training/Test Times](./results/accuracy_mean_ucr142.csv)
* [Per Resample](./results/accuracy_resamples_ucr142.csv)
## Requirements
* Python
* PyTorch
* NumPy
* scikit-learn (or similar)
## Code
### [`quant.py`](./code/quant.py)
## Documentation
[Documentation](./doc.md)
## Examples
```python
from quant import Quant
from sklearn.ensemble import ExtraTreesClassifier
[...] # load data -> torch.float32, [num_examples, 1, length]
transform = Quant()
X_training_transform = transform.fit_transform(X_training, Y_training)
X_test_transform = transform.transform(X_test)
classifier = \
ExtraTreesClassifier(
n_estimators = 200,
max_features = 0.1,
criterion = "entropy",
n_jobs = -1
)
classifier.fit(X_training_transform, Y_training)
predictions = classifier.predict(X_test_transform)
```
## Acknowledgements
We thank Professor Eamonn Keogh and all the people who have contributed to the UCR time series classification archive.
:zap: