MrSQM: Fast Time Series Classification with Symbolic Representations
Project description
MrSQM: Fast Time Series Classification with Symbolic Representations
MrSQM (Multiple Representations Sequence Miner) is a time series classifier. The MrSQM method can quickly extract features from multiple symbolic representations of time series and train a linear classification model with logistic regression. The method has four variants with four different feature selection strategies:
- MrSQM-R: Random feature selection.
- MrSQM-RS: MrSQM-R with a follow-up Chi2 test to filter less important features.
- MrSQM-S: Pruning the all-subsequence feature space with a Chi2 bound and selecting the optimal set of top k subsequences.
- MrSQM-SR: Random sampling of the features from the output of MrSQM-S.
Installation
Dependencies
cython >= 0.29
numpy >= 1.18
pandas >= 1.0.3
scikit-learn >= 0.22
fftw3 (http://www.fftw.org/)
Installation using pip
pip install mrsqm
Installation from source
Download the repository:
git clone https://github.com/mlgig/mrsqm.git
Move into the code directory of the repository:
cd mrsqm/mrsqm
Build package from source using:
pip install .
Example
Load data from arff files
X_train,y_train = util.load_from_arff_to_dataframe("data/Coffee/Coffee_TRAIN.arff")
X_test,y_test = util.load_from_arff_to_dataframe("data/Coffee/Coffee_TEST.arff")
Train with MrSQM
clf = MrSQMClassifier(nsax=0, nsfa=5)
clf.fit(X_train,y_train)
Make predictions
predicted = clf.predict(X_test)
More examples can be found in the example directory, including a Jupyter Notebook with detailed steps for training, prediction and explanation. The full UEA and UCR Archive can be downloaded from http://www.timeseriesclassification.com/.
This repository provides supporting code, results and instructions for reproducing the work presented in our publication:
"Fast Time Series Classification with Random Symbolic Subsequences", Thach Le Nguyen and Georgiana Ifrim https://project.inria.fr/aaltd22/files/2022/08/AALTD22_paper_5778.pdf
"MrSQM: Fast Time Series Classification with Symbolic Representations and Efficient Sequence Mining", Thach Le Nguyen and Georgiana Ifrim https://arxiv.org/abs/2109.01036
Citation
If you use this work, please cite as:
@article{mrsqm2022,
title={Fast Time Series Classification with Random Symbolic Subsequences},
author={Le Nguyen, Thach and Ifrim, Georgiana},
year={2022},
booktitle = {AALTD},
url = {https://project.inria.fr/aaltd22/files/2022/08/AALTD22_paper_5778.pdf},
publisher={Springer}
}
@article{mrsqm2022-extended,
title={MrSQM: Fast Time Series Classification with Symbolic Representations and Efficient Sequence Mining},
author={Le Nguyen, Thach and Ifrim, Georgiana},
year={2022},
booktitle = {arxvi},
url = {https://arxiv.org/abs/2109.01036},
publisher={}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for mrsqm-0.0.5-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e8026d691b4f3721118d685ee8d6bf0faaee9f43fd64469767913d9b033dfca |
|
MD5 | a243dea6c7ff25f32e11ab7ac1f0e624 |
|
BLAKE2b-256 | 8a205e80f4a61218d445045abb4ff029043d3f4326fb319819cda6898f1d2a5b |
Hashes for mrsqm-0.0.5-pp38-pypy38_pp73-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1320cbc2feb4568dcc70ca66dbec8c8a546a9b25d54eefaecd672ce498e947ff |
|
MD5 | 5fc719cc8a4f7d3f712dd7000f0fd123 |
|
BLAKE2b-256 | a433621cb09a3d883fb860876a2652a9e170870a00446b5e4a9a86383ff2cb83 |
Hashes for mrsqm-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eea87b2a8c8634bf5c71c03234780703d9607fe30e0b30e0af49ff12f1363bb3 |
|
MD5 | 4a432c63d76a0c218888f523667fc9f8 |
|
BLAKE2b-256 | 61dde89c7a887b6a6fc21414095674da1aa764277b6c6b996280b2a944bda00a |
Hashes for mrsqm-0.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d460b06498a0f28bf65bcfb5a8171043e3e6e1198869abad71960aa77a5e19b |
|
MD5 | bc0337afeec5acbd36b7c11eee921e66 |
|
BLAKE2b-256 | c2a7b7a7777bd009c2dd5d42950f45c9736867bf5e35aa202c447698a0db0709 |
Hashes for mrsqm-0.0.5-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a073d58c2ad2c081d8109b69324b972732ac178d786cd9116db57ff228e89179 |
|
MD5 | 2ddf010a53d87e20be48d94d5dabf01f |
|
BLAKE2b-256 | 65f2859cc79acdf6c2704cedbd070d507aa8b574519cbff53dd74ad06ec79e7b |
Hashes for mrsqm-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7546a039f757fac7fc818897163a9d22cac00256aa2e747b4b3af790fcdaf9fc |
|
MD5 | a3de856360b37d0bc3d9141c13ea2d54 |
|
BLAKE2b-256 | c1ac287a21de1c83afdeedca61e41c5bb048d338b970b04b3ab16e1b780a728a |
Hashes for mrsqm-0.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36def93442bcfed1a795074f482448e090d9264407d3a1666265b54249ecfa5f |
|
MD5 | daabe61ae28f7fc8dd23858b18240a3c |
|
BLAKE2b-256 | 0ea1efa66fde5ac9a1effcd1ebffa4960d95af1a9d28a7cbd290a1efeca0aeb5 |
Hashes for mrsqm-0.0.5-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cc591bc8fa6c7ad2e196762b0c8b9db1a7407c91806163009a616a82ea4f58b |
|
MD5 | b1d8aa1f5f85ff28824420845d1b23d1 |
|
BLAKE2b-256 | eee30054b58e5a9c35a74382974fc33b55a47913be0587169218bffec8d56b09 |
Hashes for mrsqm-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56464e9a80768cf41ae45c33cc2461d1ce080e941054d590fe0b75c157caad7f |
|
MD5 | cdc17381c7e6ac34fde8fd82fc2ec7f9 |
|
BLAKE2b-256 | 1812e9e37bc31a1d3db5da489589bab5380dcc526b394748f951b4db1434f0e4 |
Hashes for mrsqm-0.0.5-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57f522e19097837f480f39c626a8642c900c98f944a185f0c049e0d412597391 |
|
MD5 | c0d58014740ad9390e86bcb7c110855d |
|
BLAKE2b-256 | 78a4e1e9d8182cbe9e9c058397829df3949f8a6be12a06868410828820518cce |
Hashes for mrsqm-0.0.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8786f04544ecdd9179f5a51985fd3b7d107c9c3c08584830e01d6d6f644d70b |
|
MD5 | b16afb53760b297ca82e3bf81039d860 |
|
BLAKE2b-256 | dfaaca6cc747dde806cb69893ff93d3fc8cc464416ee3a91f8f754ba135a9232 |
Hashes for mrsqm-0.0.5-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32654f5b8df932232b1956e7f460d89f5c20c24c52574f9839cb135cfff50c45 |
|
MD5 | 26e25544c2ad961ce941b345870f98ee |
|
BLAKE2b-256 | cc0edd06b6c42bab66ded07b7d6c36e426367987857eca8462eddbbb98b7690c |
Hashes for mrsqm-0.0.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dd7d0b5743d03f653cc120208bbb5283bd8149d56b10eab19c645f7b954879b |
|
MD5 | 3aa072f8c358d057d2e0498c955a1ed2 |
|
BLAKE2b-256 | 6a5f9ac7979fa1ff410820f14a649da24011947fb669f37ecb57f92a597350c8 |
Hashes for mrsqm-0.0.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cb5cd8320fc3abca3d268cc8dcb8887f84ea3658e05e1f990229698d9188867 |
|
MD5 | 58f0e417f19066a8010bc8a898400b29 |
|
BLAKE2b-256 | b6d2290b41f3bc8d40d413b1b87ca5d09c3792280f2557c8695cbf737f3cb194 |
Hashes for mrsqm-0.0.5-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a582e3e2b679e936989db8d79ac4049cfb50e11c4c67d9591f749b5a80c1973 |
|
MD5 | 00e065ff16f342c703d050185178bfe2 |
|
BLAKE2b-256 | dd50a286dc7716715255904f3eae9a4f9bb13a92e2e8dbf89805943ce9b17d99 |
Hashes for mrsqm-0.0.5-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ff87da2684bccdcc9a75783f5e5931a46ad4ed798905deee5f030645513f9ab |
|
MD5 | 300dc1f187f8795658f80e3a0633eee9 |
|
BLAKE2b-256 | 15acded39bed78bc07f741902edabb3ebaac0d36055b850313e906ec9bf07a29 |