From 7e9999ed77cef9b23b4171b9dc41ad23cbec545b Mon Sep 17 00:00:00 2001 From: Tony Bagnall Date: Fri, 19 Jul 2024 09:17:20 +0100 Subject: [PATCH 1/3] move MRSQM --- aeon/classification/dictionary_based/__init__.py | 2 ++ .../_mrsqm.py | 16 ++++------------ aeon/classification/shapelet_based/__init__.py | 2 -- 3 files changed, 6 insertions(+), 14 deletions(-) rename aeon/classification/{shapelet_based => dictionary_based}/_mrsqm.py (92%) diff --git a/aeon/classification/dictionary_based/__init__.py b/aeon/classification/dictionary_based/__init__.py index 832eae10a5..29f5970edc 100644 --- a/aeon/classification/dictionary_based/__init__.py +++ b/aeon/classification/dictionary_based/__init__.py @@ -10,10 +10,12 @@ "WEASEL_V2", "MUSE", "REDCOMETS", + "MrSQMClassifier", ] from aeon.classification.dictionary_based._boss import BOSSEnsemble, IndividualBOSS from aeon.classification.dictionary_based._cboss import ContractableBOSS +from aeon.classification.dictionary_based._mrsqm import MrSQMClassifier from aeon.classification.dictionary_based._muse import MUSE from aeon.classification.dictionary_based._redcomets import REDCOMETS from aeon.classification.dictionary_based._tde import ( diff --git a/aeon/classification/shapelet_based/_mrsqm.py b/aeon/classification/dictionary_based/_mrsqm.py similarity index 92% rename from aeon/classification/shapelet_based/_mrsqm.py rename to aeon/classification/dictionary_based/_mrsqm.py index a3b1d4cc57..6c9304a144 100644 --- a/aeon/classification/shapelet_based/_mrsqm.py +++ b/aeon/classification/dictionary_based/_mrsqm.py @@ -1,13 +1,12 @@ """Multiple Representations Sequence Miner (MrSQM) Classifier.""" -__maintainer__ = [] +__maintainer__ = ["TonyBagnall"] __all__ = ["MrSQMClassifier"] from typing import List, Union import numpy as np import pandas as pd -from deprecated.sphinx import deprecated from aeon.classification import BaseClassifier @@ -31,13 +30,6 @@ def _from_numpy3d_to_nested_dataframe(X): return df -# TODO: Move in v0.11.0 -@deprecated( - version="0.10.0", - reason="MrSQMClassifier will be moved to the dictionary_based package in version " - "0.11.0 at the request of the author.", - category=FutureWarning, -) class MrSQMClassifier(BaseClassifier): """ Multiple Representations Sequence Miner (MrSQM) classifier. @@ -46,7 +38,7 @@ class MrSQMClassifier(BaseClassifier): MrSQM is not included in all extras as it requires gcc and fftw (http://www.fftw.org/index.html) to be installed for Windows and some Linux OS. - Overview: MrSQM is an efficient time series classifier utilising symbolic + Overview: MrSQM is a time series classifier utilising symbolic representations of time series. MrSQM implements four different feature selection strategies (R,S,RS,SR) that can quickly select subsequences from multiple symbolic representations of time series data. @@ -92,7 +84,7 @@ class MrSQMClassifier(BaseClassifier): Examples -------- - >>> from aeon.classification.shapelet_based import MrSQMClassifier + >>> from aeon.classification.dictionary_based import MrSQMClassifier >>> from aeon.testing.data_generation import make_example_3d_numpy >>> X, y = make_example_3d_numpy(random_state=0) >>> clf = MrSQMClassifier(random_state=0) # doctest: +SKIP @@ -102,7 +94,7 @@ class MrSQMClassifier(BaseClassifier): """ _tags = { - "X_inner_type": "numpy3D", # we don't like this, but it's the only input! + "X_inner_type": "numpy3D", "algorithm_type": "shapelet", "cant-pickle": True, "python_dependencies": "mrsqm", diff --git a/aeon/classification/shapelet_based/__init__.py b/aeon/classification/shapelet_based/__init__.py index 28702fe52f..3b76ddddec 100644 --- a/aeon/classification/shapelet_based/__init__.py +++ b/aeon/classification/shapelet_based/__init__.py @@ -1,7 +1,6 @@ """Shapelet based time series classifiers.""" __all__ = [ - "MrSQMClassifier", "ShapeletTransformClassifier", "RDSTClassifier", "SASTClassifier", @@ -10,7 +9,6 @@ ] from aeon.classification.shapelet_based._ls import LearningShapeletClassifier -from aeon.classification.shapelet_based._mrsqm import MrSQMClassifier from aeon.classification.shapelet_based._rdst import RDSTClassifier from aeon.classification.shapelet_based._rsast import RSASTClassifier from aeon.classification.shapelet_based._sast import SASTClassifier From a968bdae202d24f4bb3b545bba3a99634122d8ef Mon Sep 17 00:00:00 2001 From: Tony Bagnall Date: Fri, 19 Jul 2024 09:20:40 +0100 Subject: [PATCH 2/3] API --- docs/api_reference/classification.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api_reference/classification.rst b/docs/api_reference/classification.rst index ab36e9a19b..c87b62fa6b 100644 --- a/docs/api_reference/classification.rst +++ b/docs/api_reference/classification.rst @@ -56,6 +56,7 @@ Dictionary-based ContractableBOSS IndividualBOSS IndividualTDE + MrSQMClassifier MUSE REDCOMETS TemporalDictionaryEnsemble @@ -133,7 +134,6 @@ Shapelet-based :template: class.rst LearningShapeletClassifier - MrSQMClassifier RDSTClassifier SASTClassifier ShapeletTransformClassifier From 47136b5b132541a16d1e61714a9259b5cd09b581 Mon Sep 17 00:00:00 2001 From: Tony Bagnall Date: Fri, 19 Jul 2024 09:47:21 +0100 Subject: [PATCH 3/3] import in test --- .../testing/expected_results/classifier_results_reproduction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aeon/testing/expected_results/classifier_results_reproduction.py b/aeon/testing/expected_results/classifier_results_reproduction.py index 06c5231d2e..441a496442 100644 --- a/aeon/testing/expected_results/classifier_results_reproduction.py +++ b/aeon/testing/expected_results/classifier_results_reproduction.py @@ -23,6 +23,7 @@ WEASEL_V2, BOSSEnsemble, ContractableBOSS, + MrSQMClassifier, TemporalDictionaryEnsemble, ) from aeon.classification.distance_based import ( @@ -56,7 +57,6 @@ from aeon.classification.ordinal_classification import OrdinalTDE from aeon.classification.shapelet_based import ( LearningShapeletClassifier, - MrSQMClassifier, SASTClassifier, ShapeletTransformClassifier, )