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.7-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4743ccf908c0def97c9ee12fb7fc0e5999b0780a43f415c3d07e13decad7f01 |
|
MD5 | 84765467a6fbaf7ff5b033e3915925c7 |
|
BLAKE2b-256 | cad3c88c95be4fbaa37a05c413a448f118bd235cf27c6b0565f42f2db05e7638 |
Hashes for mrsqm-0.0.7-pp38-pypy38_pp73-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 119c7b0beda103967729d210dae11233e8959c4727b4207acd767f158059a3f7 |
|
MD5 | 74086d82ef011d1ffad7835bc51a29c2 |
|
BLAKE2b-256 | 62a730e0d11e2864ce077386c4fee9a88c5776544c8cdb359a7fb7786aa2e462 |
Hashes for mrsqm-0.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cba25034f0f1091a8f3c0bb6c682c89c7518242ae4b123dbab8d409d761feb9 |
|
MD5 | e0fc0f3f76e99aedfc05425c8caf770a |
|
BLAKE2b-256 | 0a7ecfd8be75862c14a506f997f9a9b966f4737050a68908ff8c33e0b68167f6 |
Hashes for mrsqm-0.0.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8029da315682024ee98cf01bf6b26d64733b4a8105c036b21aa0562c73cb3d96 |
|
MD5 | b20211af60d617f0d3a547ff268fd6a3 |
|
BLAKE2b-256 | ac8491036a310005bff36fdd4ac8bad4028b192f6f6ae533e2b455039614c7a9 |
Hashes for mrsqm-0.0.7-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bdb302439aaabaa234052ed7d1e73c5fae5fb99abab7d53ff8670436322de98 |
|
MD5 | 70af61182f6bd76b0fc472d96a79f199 |
|
BLAKE2b-256 | 4a13df326f8216721e47f6665a993604caa3cdf93abaaaaccb83f8c41bb09b23 |
Hashes for mrsqm-0.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cd6dbcb4dea13dfca33e7329379ea471aac4e128383f88524d35685452386e2 |
|
MD5 | 4bb85586fe40dbfa925597f6842a5d21 |
|
BLAKE2b-256 | 61d20d3dd510aa6548d2c4f7b26f64eaf2e6b87140352848d67cc010a52a98a4 |
Hashes for mrsqm-0.0.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c41741e4cc5ffe9a1b331ea874d5833c24f82a0ba7451f522e920be55e1ad2ea |
|
MD5 | 5fc44a6c38926429004df09f751b85a6 |
|
BLAKE2b-256 | b9dc8a575ebaf8730982322a3ff6d0404ef60447410a4db8b46075c078bbdcaf |
Hashes for mrsqm-0.0.7-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 068c98a8245cd3f7221c4483b693c72de9f69557c4e0b6d9c674b2bf4fd65420 |
|
MD5 | ff6d2c9405d61fbd49d0407ccf970515 |
|
BLAKE2b-256 | 2c68a71488a46c2a619597e459b743b2968fcd79ebcf4b602b8227527dc363c9 |
Hashes for mrsqm-0.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2bef1227d7f5271a245fdd18a0d3df9216b010a93589434bec1ec2ae55b7852 |
|
MD5 | ad9a30b1d9f1ff5931476a83b2ed1b90 |
|
BLAKE2b-256 | 793c2e8d7d02ed4eca99504ab21b11667f8da7e85cb26f252a6833984bcd0ade |
Hashes for mrsqm-0.0.7-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7394e9dbc4d405c56ac789390d3785affe337439c9d5fee83887755c1162f73 |
|
MD5 | a54ffea4739eac22507fd4ffeeab179a |
|
BLAKE2b-256 | 05df7246b2a39f83bd424f01df6dde58b27bee98d24130ee4570e91a5fadee37 |
Hashes for mrsqm-0.0.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86eea721e52248b1ae9d7dc257fcf19534c91d6f5aba5094ce5037dbc895dd17 |
|
MD5 | d02b4884d9ee4123ec6271d5b68f7fa9 |
|
BLAKE2b-256 | a4a484ddec246f62b861cf1df312ce41cf988dc4334bbecdaf9aca5e255ea786 |
Hashes for mrsqm-0.0.7-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc75cbda6bcbffd595a53d66d9623c8bb84c31004c41868e148528d29c1c0372 |
|
MD5 | 13d8fc3c42f0f3343b54f5ae58f4c7c8 |
|
BLAKE2b-256 | 953487a0ee8a424b2c536a334e50ff5a678b064f02653b40f8a49d5fb4ba1fe0 |
Hashes for mrsqm-0.0.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dba9fa6548bb431c80c1d39e28571187aecfeef36ee6eb5ba7663cba0ce7568f |
|
MD5 | 6051a038524b5ff867701f2407360237 |
|
BLAKE2b-256 | 6d930961264d794e94cd040e59337e9058021e59e8fa03d79031583db2570804 |
Hashes for mrsqm-0.0.7-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cb817ec53a98559f84cc1c4ec9929b8873d767f47ae86ca97262b3f4895f347 |
|
MD5 | b6293e05f472d9d247c7512aee7c02ff |
|
BLAKE2b-256 | 7f59b2e0ad59cc97511fe1a96781593b5efb9d654ae98df5cd37a184dcbc4ad7 |
Hashes for mrsqm-0.0.7-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec4cbd771956825bb9bf07031cb15ed9f1ce6dde308f3dabf7c722d852f612ee |
|
MD5 | a33520928fb8e4d0871632a8755b337c |
|
BLAKE2b-256 | 21dadf6a2e97aba16266a408e8b0c35e09c1f429087fdb379a9657cd1bae0dcf |
Hashes for mrsqm-0.0.7-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d35d6694426b517f42ef681e0bdbe62eff40bcfd25b0a8a6f53bd378402a6422 |
|
MD5 | eb6bc29a2413cd0f295313f2042d4a85 |
|
BLAKE2b-256 | 09868e1b51e155120fc951ddb105a368b8dbff55312ebcef6b18574250dbe490 |