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.6-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 127d03dc5885d4dc6702919d4aa505c90fcf35d74d0abd3f2bb8ea449098e482 |
|
MD5 | 7147a9460fcada15fa16a3b660cd8ef2 |
|
BLAKE2b-256 | 10b9a64692c8ca229c4b6ba1d368819d762f43fab84cf4f326830cd7fbfafb6d |
Hashes for mrsqm-0.0.6-pp38-pypy38_pp73-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d403fe1f1284f1a04ccb73fc5e9644d408435274eae060ea7a636e6dbe51d34d |
|
MD5 | 3414325eaceb7ad077d2bf29099ef0dc |
|
BLAKE2b-256 | ce6a2f9fad22c4b12ce67a28558751cfa51191138408f15c53dd4fe51bec60ff |
Hashes for mrsqm-0.0.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68eec6b5c10dc3a34cab27f3a9c7b8f41d57ea92e4d36fce76252a96adceec3c |
|
MD5 | 8afd72a415ccd7e5dcf6ebcd46eece86 |
|
BLAKE2b-256 | 75f90669e8ad62b9caeece212cdc6f033e7f46925491886d752253d66ed53c61 |
Hashes for mrsqm-0.0.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 932c3218a59a126620a4aed9677a739d17e3de0a5c669685ebb5fc4dcad471be |
|
MD5 | 9d1924f13ab7abac0a1cc40c81c412bd |
|
BLAKE2b-256 | b06f4d921d9c38a1da3c0ca20cab627ba15a0b0691b9fd972dff745942b2a03c |
Hashes for mrsqm-0.0.6-cp311-cp311-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 389b260ebbf7a899ec8720af61a88f9d83e81953e5c2ca95945d8b24c6b06d81 |
|
MD5 | 89624c5d50a1684ebf007977003e368c |
|
BLAKE2b-256 | 51e8feaa5df0946dd71d5f6ab625fd2ecc600af38e8303caeecb6ac9718d6cdd |
Hashes for mrsqm-0.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 607cf5a8bc91c8640cbf2a26ab63ab6ecef494ed1408e5120baee97b18a242cc |
|
MD5 | 4cd045663dce666e2caff895a95e662d |
|
BLAKE2b-256 | f32bd7631c02b42afb16505847511af285ee1b277b91b9e7b3fc94de56e147fd |
Hashes for mrsqm-0.0.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92c50bc6c278e5e149a8feeae88374e1705da40bdeef541fbecd086db9b1b6ba |
|
MD5 | b9a91c366a39973185db79f843a73128 |
|
BLAKE2b-256 | 9f1839625adc3fc49033dbeb7b0af54fb3bf51350bb7e0f67edfa02fa4106d53 |
Hashes for mrsqm-0.0.6-cp310-cp310-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a0f03c84740f2c2ecb48224b04ce110de9a30d4bc9ce0b5791c80eec5e337aa |
|
MD5 | 4b3646118542feddc5a6fcbdf4e7b135 |
|
BLAKE2b-256 | fecb8fdedaec439960011ea55f7309f8e9a150508b498c45fe7a943e65221b23 |
Hashes for mrsqm-0.0.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f0ff44647d807a6fdeae0643389e742f80af55594e1e8c40f2aebd3bfbfc04b |
|
MD5 | 61ebe6b9c0951b096f4a0b5ea3384090 |
|
BLAKE2b-256 | 6594293a98c7843313fbebb1bf18c4eede1fef26f71a51b61405c17e731b484d |
Hashes for mrsqm-0.0.6-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b059bc43bc80fcc1e1598713867db23347495158bba69220a22d4261f3747f95 |
|
MD5 | 3c2c6d5fe2fca69b020650aa78b2b2ad |
|
BLAKE2b-256 | a782dcec6faf580aa73892ba455c4c8cbd2f278a8a79a42a7a7a62b216771149 |
Hashes for mrsqm-0.0.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d574f57b3f8cb63b3e2f3c2ea004cc4964ef74fe3bf8f08a247ed8f993c52c22 |
|
MD5 | d7abc2278dbfece1900555443449e6cd |
|
BLAKE2b-256 | 8b7ed3815aedc92d7a6b740d0665a4e896ddf7084a6ed3e01977102d6352c06c |
Hashes for mrsqm-0.0.6-cp39-cp39-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f339adc088a4f95fe5f1f2f3af849ce14f4a212e0b99144cf660c28a3ab047bc |
|
MD5 | ef558024a458bf0cf6b8191e58e9e14d |
|
BLAKE2b-256 | e1826c9dbe78acec7a1f8ae51b983f834660f3e51a0782f1d2230b8bc2666da9 |
Hashes for mrsqm-0.0.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59e3cf3c075cf5207bf088ccac9eb0408f3a2b344b084222af62d4af549fd213 |
|
MD5 | be84f018d04a853b022c5ac299e712fe |
|
BLAKE2b-256 | 335b7b1fb93d4c4f4f8e6eb846ca135e7cbd48a1da62f75d3929aaf0be35fb1f |
Hashes for mrsqm-0.0.6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31ee7e6201ce90ed530fe628e623af3fae1ccfe0ab230f8745c4f5404ebe578c |
|
MD5 | 1fbdb4a8436652c2a0a120679c300210 |
|
BLAKE2b-256 | 2fc9d5ea888185c1f3513875c928f22f6ed943fbe5487cd7fe79e96704a9a5d8 |
Hashes for mrsqm-0.0.6-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb02543458703a6cae9960d0d0af2707e9d4bbbc018db8e2dce460143f40c6fd |
|
MD5 | 7b0567ad0d7f0ee5bc0372268ceadecf |
|
BLAKE2b-256 | 80ac90d239b096db5ecd3edab7d6d60634c4fea893db6d7a651e0b8b53616133 |
Hashes for mrsqm-0.0.6-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6047b40f5e32b999d07517c05ade55faa4dcdbd53f8f7ab3981f83d47006b280 |
|
MD5 | 6e6465a148c4f1fd3aa3f2b4d48bb85e |
|
BLAKE2b-256 | 1ccd0615bea6f1efb9daa54c1f233f2d11be9d3dac3904127d2d9ea2267b262a |