Skip to content

Commit

Permalink
[DEP] Move MRSQM to dictionary based (#1821)
Browse files Browse the repository at this point in the history
* move MRSQM

* API

* import in test
  • Loading branch information
TonyBagnall authored Jul 19, 2024
1 parent 35177a1 commit 61e7fe8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 16 deletions.
2 changes: 2 additions & 0 deletions aeon/classification/dictionary_based/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions aeon/classification/shapelet_based/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Shapelet based time series classifiers."""

__all__ = [
"MrSQMClassifier",
"ShapeletTransformClassifier",
"RDSTClassifier",
"SASTClassifier",
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
WEASEL_V2,
BOSSEnsemble,
ContractableBOSS,
MrSQMClassifier,
TemporalDictionaryEnsemble,
)
from aeon.classification.distance_based import (
Expand Down Expand Up @@ -56,7 +57,6 @@
from aeon.classification.ordinal_classification import OrdinalTDE
from aeon.classification.shapelet_based import (
LearningShapeletClassifier,
MrSQMClassifier,
SASTClassifier,
ShapeletTransformClassifier,
)
Expand Down
2 changes: 1 addition & 1 deletion docs/api_reference/classification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Dictionary-based
ContractableBOSS
IndividualBOSS
IndividualTDE
MrSQMClassifier
MUSE
REDCOMETS
TemporalDictionaryEnsemble
Expand Down Expand Up @@ -133,7 +134,6 @@ Shapelet-based
:template: class.rst

LearningShapeletClassifier
MrSQMClassifier
RDSTClassifier
SASTClassifier
ShapeletTransformClassifier
Expand Down

0 comments on commit 61e7fe8

Please sign in to comment.