From 3946da2d884a064c3a54025c94c78792c1a72f39 Mon Sep 17 00:00:00 2001 From: lucifer4073 Date: Tue, 10 Dec 2024 19:34:17 +0530 Subject: [PATCH 01/10] Clustering Tags added --- aeon/clustering/_clustering_tags.py | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 aeon/clustering/_clustering_tags.py diff --git a/aeon/clustering/_clustering_tags.py b/aeon/clustering/_clustering_tags.py new file mode 100644 index 0000000000..68dacda336 --- /dev/null +++ b/aeon/clustering/_clustering_tags.py @@ -0,0 +1,41 @@ +from enum import Enum + + +class ClusteringAlgorithmType(Enum): + """ + An enumeration of clustering algorithm types, dependencies, and data structures. + + This enum provides a comprehensive classification for different clustering-related + categorizations, including algorithm types, Python dependencies, and data structures + used in clustering processes. + + Attributes + ---------- + Algorithm Types: + - DISTANCE: Clustering based on distance metrics + - DEEPLEARNING: Clustering using deep learning techniques + - FEATURE: Clustering driven by feature extraction + + Python Dependencies: + - TSLEARN: Time series machine learning library + - TENSORFLOW: Deep learning framework + - TSFRESH: Time series feature extraction library + + Data Structure Types: + - NP_LIST: Numpy list-based data structure + - NUMPY3D: Three-dimensional Numpy array + """ + + # Algorithm types for clustering strategies + DISTANCE = "distance" + DEEPLEARNING = "deeplearning" + FEATURE = "feature" + + # Python dependencies for clustering implementations + TSLEARN = "tslearn" + TENSORFLOW = "tensorflow" + TSFRESH = "tsfresh" + + # Data structure types for clustering input + NP_LIST = "np_list" + NUMPY3D = "numpy3D" From dfe1f6d99fa435639cff9f7f7ee5f514ed7e2ae5 Mon Sep 17 00:00:00 2001 From: lucifer4073 Date: Tue, 10 Dec 2024 21:37:30 +0530 Subject: [PATCH 02/10] Enum added for the first files --- aeon/clustering/_elastic_som.py | 3 ++- aeon/clustering/_k_means.py | 4 +++- aeon/clustering/_k_medoids.py | 4 +++- aeon/clustering/_k_sc.py | 3 ++- aeon/clustering/_k_shape.py | 5 +++-- aeon/clustering/_kernel_k_means.py | 3 ++- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/aeon/clustering/_elastic_som.py b/aeon/clustering/_elastic_som.py index da88bb541c..20bef0ad43 100644 --- a/aeon/clustering/_elastic_som.py +++ b/aeon/clustering/_elastic_som.py @@ -4,6 +4,7 @@ from numpy.random import RandomState from sklearn.utils.random import check_random_state +from aeon.clustering._clustering_tags import ClusteringAlgorithmType from aeon.clustering.base import BaseClusterer from aeon.distances import get_alignment_path_function, pairwise_distance @@ -148,7 +149,7 @@ class ElasticSOM(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": "distance", + "algorithm_type": ClusteringAlgorithmType.DISTANCE, } def __init__( diff --git a/aeon/clustering/_k_means.py b/aeon/clustering/_k_means.py index e4e459a5cf..f4062e3020 100644 --- a/aeon/clustering/_k_means.py +++ b/aeon/clustering/_k_means.py @@ -2,6 +2,8 @@ from typing import Optional +from aeon.clustering._clustering_tags import ClusteringAlgorithmType + __maintainer__ = [] from typing import Callable, Union @@ -153,7 +155,7 @@ class TimeSeriesKMeans(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": "distance", + "algorithm_type": ClusteringAlgorithmType.DISTANCE, } def __init__( diff --git a/aeon/clustering/_k_medoids.py b/aeon/clustering/_k_medoids.py index 12d0f2819d..364cbe1aac 100644 --- a/aeon/clustering/_k_medoids.py +++ b/aeon/clustering/_k_medoids.py @@ -2,6 +2,8 @@ from typing import Optional +from aeon.clustering._clustering_tags import ClusteringAlgorithmType + __maintainer__ = [] import warnings @@ -146,7 +148,7 @@ class TimeSeriesKMedoids(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": "distance", + "algorithm_type": ClusteringAlgorithmType.DISTANCE, } def __init__( diff --git a/aeon/clustering/_k_sc.py b/aeon/clustering/_k_sc.py index 1ace94b245..0b55345165 100644 --- a/aeon/clustering/_k_sc.py +++ b/aeon/clustering/_k_sc.py @@ -6,6 +6,7 @@ from numpy.random import RandomState from aeon.clustering import TimeSeriesKMeans +from aeon.clustering._clustering_tags import ClusteringAlgorithmType class KSpectralCentroid(TimeSeriesKMeans): @@ -92,7 +93,7 @@ class KSpectralCentroid(TimeSeriesKMeans): _tags = { "capability:multivariate": True, - "algorithm_type": "distance", + "algorithm_type": ClusteringAlgorithmType.DISTANCE, } def __init__( diff --git a/aeon/clustering/_k_shape.py b/aeon/clustering/_k_shape.py index aa8d8a3b64..7820d0e382 100644 --- a/aeon/clustering/_k_shape.py +++ b/aeon/clustering/_k_shape.py @@ -5,6 +5,7 @@ import numpy as np from numpy.random import RandomState +from aeon.clustering._clustering_tags import ClusteringAlgorithmType from aeon.clustering.base import BaseClusterer @@ -69,8 +70,8 @@ class TimeSeriesKShape(BaseClusterer): _tags = { "capability:multivariate": True, - "python_dependencies": "tslearn", - "algorithm_type": "distance", + "python_dependencies": ClusteringAlgorithmType.TSLEARN.value, + "algorithm_type": ClusteringAlgorithmType.DISTANCE, } def __init__( diff --git a/aeon/clustering/_kernel_k_means.py b/aeon/clustering/_kernel_k_means.py index 6aab712def..86812895ca 100644 --- a/aeon/clustering/_kernel_k_means.py +++ b/aeon/clustering/_kernel_k_means.py @@ -5,6 +5,7 @@ import numpy as np from numpy.random import RandomState +from aeon.clustering._clustering_tags import ClusteringAlgorithmType from aeon.clustering.base import BaseClusterer @@ -86,7 +87,7 @@ class TimeSeriesKernelKMeans(BaseClusterer): _tags = { "capability:multivariate": True, "capability:multithreading": True, - "python_dependencies": "tslearn", + "python_dependencies": ClusteringAlgorithmType.TSLEARN.value, } def __init__( From 924b43940ea67796a22bd891be98d26da6adb506 Mon Sep 17 00:00:00 2001 From: lucifer4073 Date: Tue, 10 Dec 2024 22:03:58 +0530 Subject: [PATCH 03/10] Refactor: Update remaining clustering module files to use Enum for package management --- aeon/clustering/compose/_pipeline.py | 6 +++++- aeon/clustering/deep_learning/base.py | 7 ++++--- aeon/clustering/feature_based/_catch22.py | 8 ++++++-- aeon/clustering/feature_based/_summary.py | 3 ++- aeon/clustering/feature_based/_tsfresh.py | 5 +++-- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/aeon/clustering/compose/_pipeline.py b/aeon/clustering/compose/_pipeline.py index fef3f87e0b..1b6ecd6227 100644 --- a/aeon/clustering/compose/_pipeline.py +++ b/aeon/clustering/compose/_pipeline.py @@ -6,6 +6,7 @@ from aeon.base._estimators.compose.collection_pipeline import BaseCollectionPipeline from aeon.clustering import BaseClusterer +from aeon.clustering._clustering_tags import ClusteringAlgorithmType class ClustererPipeline(BaseCollectionPipeline, BaseClusterer): @@ -75,7 +76,10 @@ class ClustererPipeline(BaseCollectionPipeline, BaseClusterer): """ _tags = { - "X_inner_type": ["np-list", "numpy3D"], + "X_inner_type": [ + ClusteringAlgorithmType.NP_LIST.value, + ClusteringAlgorithmType.NUMPY3D.value, + ], } def __init__(self, transformers, clusterer, random_state=None): diff --git a/aeon/clustering/deep_learning/base.py b/aeon/clustering/deep_learning/base.py index 4a05e8c662..063347cff6 100644 --- a/aeon/clustering/deep_learning/base.py +++ b/aeon/clustering/deep_learning/base.py @@ -6,6 +6,7 @@ from copy import deepcopy from aeon.base._base import _clone_estimator +from aeon.clustering._clustering_tags import ClusteringAlgorithmType from aeon.clustering._k_means import TimeSeriesKMeans from aeon.clustering.base import BaseClusterer @@ -29,12 +30,12 @@ class BaseDeepClusterer(BaseClusterer): """ _tags = { - "X_inner_type": "numpy3D", + "X_inner_type": ClusteringAlgorithmType.NUMPY3D.value, "capability:multivariate": True, - "algorithm_type": "deeplearning", + "algorithm_type": ClusteringAlgorithmType.DEEPLEARNING, "non_deterministic": True, "cant_pickle": True, - "python_dependencies": "tensorflow", + "python_dependencies": ClusteringAlgorithmType.TENSORFLOW.value, } @abstractmethod diff --git a/aeon/clustering/feature_based/_catch22.py b/aeon/clustering/feature_based/_catch22.py index 33f0b79bc5..f20ed09dca 100644 --- a/aeon/clustering/feature_based/_catch22.py +++ b/aeon/clustering/feature_based/_catch22.py @@ -11,6 +11,7 @@ from aeon.base._base import _clone_estimator from aeon.clustering import BaseClusterer +from aeon.clustering._clustering_tags import ClusteringAlgorithmType from aeon.transformations.collection.feature_based import Catch22 @@ -92,11 +93,14 @@ class Catch22Clusterer(BaseClusterer): """ _tags = { - "X_inner_type": ["np-list", "numpy3D"], + "X_inner_type": [ + ClusteringAlgorithmType.NP_LIST.value, + ClusteringAlgorithmType.NUMPY3D.value, + ], "capability:multivariate": True, "capability:unequal_length": True, "capability:multithreading": True, - "algorithm_type": "feature", + "algorithm_type": ClusteringAlgorithmType.FEATURE, } def __init__( diff --git a/aeon/clustering/feature_based/_summary.py b/aeon/clustering/feature_based/_summary.py index 309d3ac92f..404aaa3d43 100644 --- a/aeon/clustering/feature_based/_summary.py +++ b/aeon/clustering/feature_based/_summary.py @@ -11,6 +11,7 @@ from aeon.base._base import _clone_estimator from aeon.clustering import BaseClusterer +from aeon.clustering._clustering_tags import ClusteringAlgorithmType from aeon.transformations.collection.feature_based import SevenNumberSummary @@ -64,7 +65,7 @@ class SummaryClusterer(BaseClusterer): _tags = { "capability:multivariate": True, "capability:multithreading": True, - "algorithm_type": "feature", + "algorithm_type": ClusteringAlgorithmType.FEATURE, } def __init__( diff --git a/aeon/clustering/feature_based/_tsfresh.py b/aeon/clustering/feature_based/_tsfresh.py index ed14e90a47..b065d0d289 100644 --- a/aeon/clustering/feature_based/_tsfresh.py +++ b/aeon/clustering/feature_based/_tsfresh.py @@ -14,6 +14,7 @@ from aeon.base._base import _clone_estimator from aeon.clustering import BaseClusterer +from aeon.clustering._clustering_tags import ClusteringAlgorithmType from aeon.transformations.collection.feature_based import TSFresh @@ -74,8 +75,8 @@ class TSFreshClusterer(BaseClusterer): _tags = { "capability:multivariate": True, "capability:multithreading": True, - "algorithm_type": "feature", - "python_dependencies": "tsfresh", + "algorithm_type": ClusteringAlgorithmType.FEATURE, + "python_dependencies": ClusteringAlgorithmType.TSFRESH.value, } def __init__( From f7902bf6683e4683e91a21de7ad7798c24a65abd Mon Sep 17 00:00:00 2001 From: lucifer4073 Date: Thu, 12 Dec 2024 14:19:57 +0530 Subject: [PATCH 04/10] feat: add enum.values to files for improved functionality --- aeon/clustering/_elastic_som.py | 2 +- aeon/clustering/_k_means.py | 2 +- aeon/clustering/_k_medoids.py | 2 +- aeon/clustering/_k_sc.py | 2 +- aeon/clustering/_k_shape.py | 2 +- aeon/clustering/deep_learning/base.py | 2 +- aeon/clustering/feature_based/_catch22.py | 2 +- aeon/clustering/feature_based/_summary.py | 2 +- aeon/clustering/feature_based/_tsfresh.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/aeon/clustering/_elastic_som.py b/aeon/clustering/_elastic_som.py index 20bef0ad43..d1f3d8f90f 100644 --- a/aeon/clustering/_elastic_som.py +++ b/aeon/clustering/_elastic_som.py @@ -149,7 +149,7 @@ class ElasticSOM(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE, + "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/_k_means.py b/aeon/clustering/_k_means.py index f4062e3020..6288fbd86d 100644 --- a/aeon/clustering/_k_means.py +++ b/aeon/clustering/_k_means.py @@ -155,7 +155,7 @@ class TimeSeriesKMeans(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE, + "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/_k_medoids.py b/aeon/clustering/_k_medoids.py index 364cbe1aac..15ad9df014 100644 --- a/aeon/clustering/_k_medoids.py +++ b/aeon/clustering/_k_medoids.py @@ -148,7 +148,7 @@ class TimeSeriesKMedoids(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE, + "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/_k_sc.py b/aeon/clustering/_k_sc.py index 0b55345165..1da9f906ae 100644 --- a/aeon/clustering/_k_sc.py +++ b/aeon/clustering/_k_sc.py @@ -93,7 +93,7 @@ class KSpectralCentroid(TimeSeriesKMeans): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE, + "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/_k_shape.py b/aeon/clustering/_k_shape.py index 7820d0e382..7a93ef0a30 100644 --- a/aeon/clustering/_k_shape.py +++ b/aeon/clustering/_k_shape.py @@ -71,7 +71,7 @@ class TimeSeriesKShape(BaseClusterer): _tags = { "capability:multivariate": True, "python_dependencies": ClusteringAlgorithmType.TSLEARN.value, - "algorithm_type": ClusteringAlgorithmType.DISTANCE, + "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/deep_learning/base.py b/aeon/clustering/deep_learning/base.py index 063347cff6..0ecec07781 100644 --- a/aeon/clustering/deep_learning/base.py +++ b/aeon/clustering/deep_learning/base.py @@ -32,7 +32,7 @@ class BaseDeepClusterer(BaseClusterer): _tags = { "X_inner_type": ClusteringAlgorithmType.NUMPY3D.value, "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DEEPLEARNING, + "algorithm_type": ClusteringAlgorithmType.DEEPLEARNING.value, "non_deterministic": True, "cant_pickle": True, "python_dependencies": ClusteringAlgorithmType.TENSORFLOW.value, diff --git a/aeon/clustering/feature_based/_catch22.py b/aeon/clustering/feature_based/_catch22.py index f20ed09dca..5d9ce6e8c0 100644 --- a/aeon/clustering/feature_based/_catch22.py +++ b/aeon/clustering/feature_based/_catch22.py @@ -100,7 +100,7 @@ class Catch22Clusterer(BaseClusterer): "capability:multivariate": True, "capability:unequal_length": True, "capability:multithreading": True, - "algorithm_type": ClusteringAlgorithmType.FEATURE, + "algorithm_type": ClusteringAlgorithmType.FEATURE.value, } def __init__( diff --git a/aeon/clustering/feature_based/_summary.py b/aeon/clustering/feature_based/_summary.py index 404aaa3d43..62d62fb99c 100644 --- a/aeon/clustering/feature_based/_summary.py +++ b/aeon/clustering/feature_based/_summary.py @@ -65,7 +65,7 @@ class SummaryClusterer(BaseClusterer): _tags = { "capability:multivariate": True, "capability:multithreading": True, - "algorithm_type": ClusteringAlgorithmType.FEATURE, + "algorithm_type": ClusteringAlgorithmType.FEATURE.value, } def __init__( diff --git a/aeon/clustering/feature_based/_tsfresh.py b/aeon/clustering/feature_based/_tsfresh.py index b065d0d289..59970cef81 100644 --- a/aeon/clustering/feature_based/_tsfresh.py +++ b/aeon/clustering/feature_based/_tsfresh.py @@ -75,7 +75,7 @@ class TSFreshClusterer(BaseClusterer): _tags = { "capability:multivariate": True, "capability:multithreading": True, - "algorithm_type": ClusteringAlgorithmType.FEATURE, + "algorithm_type": ClusteringAlgorithmType.FEATURE.value, "python_dependencies": ClusteringAlgorithmType.TSFRESH.value, } From 879cd62cf77815710fffb41645fa53bee201cd6e Mon Sep 17 00:00:00 2001 From: lucifer4073 Date: Thu, 12 Dec 2024 15:26:32 +0530 Subject: [PATCH 05/10] "np-list" error addressed --- aeon/clustering/_clustering_tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aeon/clustering/_clustering_tags.py b/aeon/clustering/_clustering_tags.py index 68dacda336..3eb712fe12 100644 --- a/aeon/clustering/_clustering_tags.py +++ b/aeon/clustering/_clustering_tags.py @@ -37,5 +37,5 @@ class ClusteringAlgorithmType(Enum): TSFRESH = "tsfresh" # Data structure types for clustering input - NP_LIST = "np_list" + NP_LIST = "np-list" NUMPY3D = "numpy3D" From f9a50f356c2f4070ad7947747e46d48905661f1d Mon Sep 17 00:00:00 2001 From: lucifer4073 Date: Thu, 12 Dec 2024 16:03:45 +0530 Subject: [PATCH 06/10] Algorithm types for clustering tags edited --- aeon/clustering/_elastic_som.py | 2 +- aeon/clustering/_k_means.py | 2 +- aeon/clustering/_k_medoids.py | 2 +- aeon/clustering/_k_sc.py | 2 +- aeon/clustering/_k_shape.py | 2 +- aeon/clustering/deep_learning/base.py | 2 +- aeon/clustering/feature_based/_catch22.py | 2 +- aeon/clustering/feature_based/_summary.py | 2 +- aeon/clustering/feature_based/_tsfresh.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/aeon/clustering/_elastic_som.py b/aeon/clustering/_elastic_som.py index d1f3d8f90f..20bef0ad43 100644 --- a/aeon/clustering/_elastic_som.py +++ b/aeon/clustering/_elastic_som.py @@ -149,7 +149,7 @@ class ElasticSOM(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, + "algorithm_type": ClusteringAlgorithmType.DISTANCE, } def __init__( diff --git a/aeon/clustering/_k_means.py b/aeon/clustering/_k_means.py index 6288fbd86d..f4062e3020 100644 --- a/aeon/clustering/_k_means.py +++ b/aeon/clustering/_k_means.py @@ -155,7 +155,7 @@ class TimeSeriesKMeans(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, + "algorithm_type": ClusteringAlgorithmType.DISTANCE, } def __init__( diff --git a/aeon/clustering/_k_medoids.py b/aeon/clustering/_k_medoids.py index 15ad9df014..364cbe1aac 100644 --- a/aeon/clustering/_k_medoids.py +++ b/aeon/clustering/_k_medoids.py @@ -148,7 +148,7 @@ class TimeSeriesKMedoids(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, + "algorithm_type": ClusteringAlgorithmType.DISTANCE, } def __init__( diff --git a/aeon/clustering/_k_sc.py b/aeon/clustering/_k_sc.py index 1da9f906ae..0b55345165 100644 --- a/aeon/clustering/_k_sc.py +++ b/aeon/clustering/_k_sc.py @@ -93,7 +93,7 @@ class KSpectralCentroid(TimeSeriesKMeans): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, + "algorithm_type": ClusteringAlgorithmType.DISTANCE, } def __init__( diff --git a/aeon/clustering/_k_shape.py b/aeon/clustering/_k_shape.py index 7a93ef0a30..7820d0e382 100644 --- a/aeon/clustering/_k_shape.py +++ b/aeon/clustering/_k_shape.py @@ -71,7 +71,7 @@ class TimeSeriesKShape(BaseClusterer): _tags = { "capability:multivariate": True, "python_dependencies": ClusteringAlgorithmType.TSLEARN.value, - "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, + "algorithm_type": ClusteringAlgorithmType.DISTANCE, } def __init__( diff --git a/aeon/clustering/deep_learning/base.py b/aeon/clustering/deep_learning/base.py index 0ecec07781..063347cff6 100644 --- a/aeon/clustering/deep_learning/base.py +++ b/aeon/clustering/deep_learning/base.py @@ -32,7 +32,7 @@ class BaseDeepClusterer(BaseClusterer): _tags = { "X_inner_type": ClusteringAlgorithmType.NUMPY3D.value, "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DEEPLEARNING.value, + "algorithm_type": ClusteringAlgorithmType.DEEPLEARNING, "non_deterministic": True, "cant_pickle": True, "python_dependencies": ClusteringAlgorithmType.TENSORFLOW.value, diff --git a/aeon/clustering/feature_based/_catch22.py b/aeon/clustering/feature_based/_catch22.py index 5d9ce6e8c0..f20ed09dca 100644 --- a/aeon/clustering/feature_based/_catch22.py +++ b/aeon/clustering/feature_based/_catch22.py @@ -100,7 +100,7 @@ class Catch22Clusterer(BaseClusterer): "capability:multivariate": True, "capability:unequal_length": True, "capability:multithreading": True, - "algorithm_type": ClusteringAlgorithmType.FEATURE.value, + "algorithm_type": ClusteringAlgorithmType.FEATURE, } def __init__( diff --git a/aeon/clustering/feature_based/_summary.py b/aeon/clustering/feature_based/_summary.py index 62d62fb99c..404aaa3d43 100644 --- a/aeon/clustering/feature_based/_summary.py +++ b/aeon/clustering/feature_based/_summary.py @@ -65,7 +65,7 @@ class SummaryClusterer(BaseClusterer): _tags = { "capability:multivariate": True, "capability:multithreading": True, - "algorithm_type": ClusteringAlgorithmType.FEATURE.value, + "algorithm_type": ClusteringAlgorithmType.FEATURE, } def __init__( diff --git a/aeon/clustering/feature_based/_tsfresh.py b/aeon/clustering/feature_based/_tsfresh.py index 59970cef81..b065d0d289 100644 --- a/aeon/clustering/feature_based/_tsfresh.py +++ b/aeon/clustering/feature_based/_tsfresh.py @@ -75,7 +75,7 @@ class TSFreshClusterer(BaseClusterer): _tags = { "capability:multivariate": True, "capability:multithreading": True, - "algorithm_type": ClusteringAlgorithmType.FEATURE.value, + "algorithm_type": ClusteringAlgorithmType.FEATURE, "python_dependencies": ClusteringAlgorithmType.TSFRESH.value, } From 2dc739efe1f65e200f669e8aaf187351ca142521 Mon Sep 17 00:00:00 2001 From: lucifer4073 Date: Thu, 12 Dec 2024 16:13:00 +0530 Subject: [PATCH 07/10] Algorithm types for clustering tags edited --- aeon/clustering/_elastic_som.py | 2 +- aeon/clustering/_k_means.py | 2 +- aeon/clustering/_k_medoids.py | 2 +- aeon/clustering/_k_sc.py | 2 +- aeon/clustering/_k_shape.py | 2 +- aeon/clustering/deep_learning/base.py | 2 +- aeon/clustering/feature_based/_catch22.py | 2 +- aeon/clustering/feature_based/_summary.py | 2 +- aeon/clustering/feature_based/_tsfresh.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/aeon/clustering/_elastic_som.py b/aeon/clustering/_elastic_som.py index 20bef0ad43..d1f3d8f90f 100644 --- a/aeon/clustering/_elastic_som.py +++ b/aeon/clustering/_elastic_som.py @@ -149,7 +149,7 @@ class ElasticSOM(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE, + "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/_k_means.py b/aeon/clustering/_k_means.py index f4062e3020..6288fbd86d 100644 --- a/aeon/clustering/_k_means.py +++ b/aeon/clustering/_k_means.py @@ -155,7 +155,7 @@ class TimeSeriesKMeans(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE, + "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/_k_medoids.py b/aeon/clustering/_k_medoids.py index 364cbe1aac..15ad9df014 100644 --- a/aeon/clustering/_k_medoids.py +++ b/aeon/clustering/_k_medoids.py @@ -148,7 +148,7 @@ class TimeSeriesKMedoids(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE, + "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/_k_sc.py b/aeon/clustering/_k_sc.py index 0b55345165..1da9f906ae 100644 --- a/aeon/clustering/_k_sc.py +++ b/aeon/clustering/_k_sc.py @@ -93,7 +93,7 @@ class KSpectralCentroid(TimeSeriesKMeans): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE, + "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/_k_shape.py b/aeon/clustering/_k_shape.py index 7820d0e382..7a93ef0a30 100644 --- a/aeon/clustering/_k_shape.py +++ b/aeon/clustering/_k_shape.py @@ -71,7 +71,7 @@ class TimeSeriesKShape(BaseClusterer): _tags = { "capability:multivariate": True, "python_dependencies": ClusteringAlgorithmType.TSLEARN.value, - "algorithm_type": ClusteringAlgorithmType.DISTANCE, + "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/deep_learning/base.py b/aeon/clustering/deep_learning/base.py index 063347cff6..0ecec07781 100644 --- a/aeon/clustering/deep_learning/base.py +++ b/aeon/clustering/deep_learning/base.py @@ -32,7 +32,7 @@ class BaseDeepClusterer(BaseClusterer): _tags = { "X_inner_type": ClusteringAlgorithmType.NUMPY3D.value, "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DEEPLEARNING, + "algorithm_type": ClusteringAlgorithmType.DEEPLEARNING.value, "non_deterministic": True, "cant_pickle": True, "python_dependencies": ClusteringAlgorithmType.TENSORFLOW.value, diff --git a/aeon/clustering/feature_based/_catch22.py b/aeon/clustering/feature_based/_catch22.py index f20ed09dca..5d9ce6e8c0 100644 --- a/aeon/clustering/feature_based/_catch22.py +++ b/aeon/clustering/feature_based/_catch22.py @@ -100,7 +100,7 @@ class Catch22Clusterer(BaseClusterer): "capability:multivariate": True, "capability:unequal_length": True, "capability:multithreading": True, - "algorithm_type": ClusteringAlgorithmType.FEATURE, + "algorithm_type": ClusteringAlgorithmType.FEATURE.value, } def __init__( diff --git a/aeon/clustering/feature_based/_summary.py b/aeon/clustering/feature_based/_summary.py index 404aaa3d43..62d62fb99c 100644 --- a/aeon/clustering/feature_based/_summary.py +++ b/aeon/clustering/feature_based/_summary.py @@ -65,7 +65,7 @@ class SummaryClusterer(BaseClusterer): _tags = { "capability:multivariate": True, "capability:multithreading": True, - "algorithm_type": ClusteringAlgorithmType.FEATURE, + "algorithm_type": ClusteringAlgorithmType.FEATURE.value, } def __init__( diff --git a/aeon/clustering/feature_based/_tsfresh.py b/aeon/clustering/feature_based/_tsfresh.py index b065d0d289..59970cef81 100644 --- a/aeon/clustering/feature_based/_tsfresh.py +++ b/aeon/clustering/feature_based/_tsfresh.py @@ -75,7 +75,7 @@ class TSFreshClusterer(BaseClusterer): _tags = { "capability:multivariate": True, "capability:multithreading": True, - "algorithm_type": ClusteringAlgorithmType.FEATURE, + "algorithm_type": ClusteringAlgorithmType.FEATURE.value, "python_dependencies": ClusteringAlgorithmType.TSFRESH.value, } From 201c99ecbf6cf2b1155982ec115282410e47b7e1 Mon Sep 17 00:00:00 2001 From: lucifer4073 Date: Sat, 14 Dec 2024 16:15:08 +0530 Subject: [PATCH 08/10] Algorithm Type moved to utils/tags, enumeration for dependencies removed --- aeon/clustering/_clustering_tags.py | 41 ----------------------- aeon/clustering/_elastic_som.py | 4 +-- aeon/clustering/_k_means.py | 4 +-- aeon/clustering/_k_medoids.py | 4 +-- aeon/clustering/_k_sc.py | 4 +-- aeon/clustering/_k_shape.py | 6 ++-- aeon/clustering/_kernel_k_means.py | 3 +- aeon/clustering/compose/_pipeline.py | 6 ++-- aeon/clustering/deep_learning/base.py | 8 ++--- aeon/clustering/feature_based/_catch22.py | 8 ++--- aeon/clustering/feature_based/_summary.py | 4 +-- aeon/clustering/feature_based/_tsfresh.py | 6 ++-- aeon/utils/tags/_enum_tags.py | 27 +++++++++++++++ 13 files changed, 55 insertions(+), 70 deletions(-) delete mode 100644 aeon/clustering/_clustering_tags.py create mode 100644 aeon/utils/tags/_enum_tags.py diff --git a/aeon/clustering/_clustering_tags.py b/aeon/clustering/_clustering_tags.py deleted file mode 100644 index 3eb712fe12..0000000000 --- a/aeon/clustering/_clustering_tags.py +++ /dev/null @@ -1,41 +0,0 @@ -from enum import Enum - - -class ClusteringAlgorithmType(Enum): - """ - An enumeration of clustering algorithm types, dependencies, and data structures. - - This enum provides a comprehensive classification for different clustering-related - categorizations, including algorithm types, Python dependencies, and data structures - used in clustering processes. - - Attributes - ---------- - Algorithm Types: - - DISTANCE: Clustering based on distance metrics - - DEEPLEARNING: Clustering using deep learning techniques - - FEATURE: Clustering driven by feature extraction - - Python Dependencies: - - TSLEARN: Time series machine learning library - - TENSORFLOW: Deep learning framework - - TSFRESH: Time series feature extraction library - - Data Structure Types: - - NP_LIST: Numpy list-based data structure - - NUMPY3D: Three-dimensional Numpy array - """ - - # Algorithm types for clustering strategies - DISTANCE = "distance" - DEEPLEARNING = "deeplearning" - FEATURE = "feature" - - # Python dependencies for clustering implementations - TSLEARN = "tslearn" - TENSORFLOW = "tensorflow" - TSFRESH = "tsfresh" - - # Data structure types for clustering input - NP_LIST = "np-list" - NUMPY3D = "numpy3D" diff --git a/aeon/clustering/_elastic_som.py b/aeon/clustering/_elastic_som.py index d1f3d8f90f..104b66644b 100644 --- a/aeon/clustering/_elastic_som.py +++ b/aeon/clustering/_elastic_som.py @@ -4,9 +4,9 @@ from numpy.random import RandomState from sklearn.utils.random import check_random_state -from aeon.clustering._clustering_tags import ClusteringAlgorithmType from aeon.clustering.base import BaseClusterer from aeon.distances import get_alignment_path_function, pairwise_distance +from aeon.utils.tags._enum_tags import AlgorithmType VALID_ELASTIC_SOM_METRICS = [ "dtw", @@ -149,7 +149,7 @@ class ElasticSOM(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, + "algorithm_type": AlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/_k_means.py b/aeon/clustering/_k_means.py index 6288fbd86d..5dd6c52ba4 100644 --- a/aeon/clustering/_k_means.py +++ b/aeon/clustering/_k_means.py @@ -2,7 +2,7 @@ from typing import Optional -from aeon.clustering._clustering_tags import ClusteringAlgorithmType +from aeon.utils.tags._enum_tags import AlgorithmType __maintainer__ = [] @@ -155,7 +155,7 @@ class TimeSeriesKMeans(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, + "algorithm_type": AlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/_k_medoids.py b/aeon/clustering/_k_medoids.py index 15ad9df014..9b2606d48f 100644 --- a/aeon/clustering/_k_medoids.py +++ b/aeon/clustering/_k_medoids.py @@ -2,7 +2,7 @@ from typing import Optional -from aeon.clustering._clustering_tags import ClusteringAlgorithmType +from aeon.utils.tags._enum_tags import AlgorithmType __maintainer__ = [] @@ -148,7 +148,7 @@ class TimeSeriesKMedoids(BaseClusterer): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, + "algorithm_type": AlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/_k_sc.py b/aeon/clustering/_k_sc.py index 1da9f906ae..b5d65d969c 100644 --- a/aeon/clustering/_k_sc.py +++ b/aeon/clustering/_k_sc.py @@ -6,7 +6,7 @@ from numpy.random import RandomState from aeon.clustering import TimeSeriesKMeans -from aeon.clustering._clustering_tags import ClusteringAlgorithmType +from aeon.utils.tags._enum_tags import AlgorithmType class KSpectralCentroid(TimeSeriesKMeans): @@ -93,7 +93,7 @@ class KSpectralCentroid(TimeSeriesKMeans): _tags = { "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, + "algorithm_type": AlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/_k_shape.py b/aeon/clustering/_k_shape.py index 7a93ef0a30..5ba6ccdb52 100644 --- a/aeon/clustering/_k_shape.py +++ b/aeon/clustering/_k_shape.py @@ -5,8 +5,8 @@ import numpy as np from numpy.random import RandomState -from aeon.clustering._clustering_tags import ClusteringAlgorithmType from aeon.clustering.base import BaseClusterer +from aeon.utils.tags._enum_tags import AlgorithmType class TimeSeriesKShape(BaseClusterer): @@ -70,8 +70,8 @@ class TimeSeriesKShape(BaseClusterer): _tags = { "capability:multivariate": True, - "python_dependencies": ClusteringAlgorithmType.TSLEARN.value, - "algorithm_type": ClusteringAlgorithmType.DISTANCE.value, + "python_dependencies": "tslearn", + "algorithm_type": AlgorithmType.DISTANCE.value, } def __init__( diff --git a/aeon/clustering/_kernel_k_means.py b/aeon/clustering/_kernel_k_means.py index 86812895ca..6aab712def 100644 --- a/aeon/clustering/_kernel_k_means.py +++ b/aeon/clustering/_kernel_k_means.py @@ -5,7 +5,6 @@ import numpy as np from numpy.random import RandomState -from aeon.clustering._clustering_tags import ClusteringAlgorithmType from aeon.clustering.base import BaseClusterer @@ -87,7 +86,7 @@ class TimeSeriesKernelKMeans(BaseClusterer): _tags = { "capability:multivariate": True, "capability:multithreading": True, - "python_dependencies": ClusteringAlgorithmType.TSLEARN.value, + "python_dependencies": "tslearn", } def __init__( diff --git a/aeon/clustering/compose/_pipeline.py b/aeon/clustering/compose/_pipeline.py index 1b6ecd6227..6de3b019d7 100644 --- a/aeon/clustering/compose/_pipeline.py +++ b/aeon/clustering/compose/_pipeline.py @@ -6,7 +6,7 @@ from aeon.base._estimators.compose.collection_pipeline import BaseCollectionPipeline from aeon.clustering import BaseClusterer -from aeon.clustering._clustering_tags import ClusteringAlgorithmType +from aeon.utils.tags._enum_tags import AlgorithmType class ClustererPipeline(BaseCollectionPipeline, BaseClusterer): @@ -77,8 +77,8 @@ class ClustererPipeline(BaseCollectionPipeline, BaseClusterer): _tags = { "X_inner_type": [ - ClusteringAlgorithmType.NP_LIST.value, - ClusteringAlgorithmType.NUMPY3D.value, + AlgorithmType.NP_LIST.value, + AlgorithmType.NUMPY3D.value, ], } diff --git a/aeon/clustering/deep_learning/base.py b/aeon/clustering/deep_learning/base.py index 0ecec07781..d339907614 100644 --- a/aeon/clustering/deep_learning/base.py +++ b/aeon/clustering/deep_learning/base.py @@ -6,9 +6,9 @@ from copy import deepcopy from aeon.base._base import _clone_estimator -from aeon.clustering._clustering_tags import ClusteringAlgorithmType from aeon.clustering._k_means import TimeSeriesKMeans from aeon.clustering.base import BaseClusterer +from aeon.utils.tags._enum_tags import AlgorithmType class BaseDeepClusterer(BaseClusterer): @@ -30,12 +30,12 @@ class BaseDeepClusterer(BaseClusterer): """ _tags = { - "X_inner_type": ClusteringAlgorithmType.NUMPY3D.value, + "X_inner_type": AlgorithmType.NUMPY3D.value, "capability:multivariate": True, - "algorithm_type": ClusteringAlgorithmType.DEEPLEARNING.value, + "algorithm_type": AlgorithmType.DEEPLEARNING.value, "non_deterministic": True, "cant_pickle": True, - "python_dependencies": ClusteringAlgorithmType.TENSORFLOW.value, + "python_dependencies": "tensorflow", } @abstractmethod diff --git a/aeon/clustering/feature_based/_catch22.py b/aeon/clustering/feature_based/_catch22.py index 5d9ce6e8c0..3b63e0a63b 100644 --- a/aeon/clustering/feature_based/_catch22.py +++ b/aeon/clustering/feature_based/_catch22.py @@ -11,8 +11,8 @@ from aeon.base._base import _clone_estimator from aeon.clustering import BaseClusterer -from aeon.clustering._clustering_tags import ClusteringAlgorithmType from aeon.transformations.collection.feature_based import Catch22 +from aeon.utils.tags._enum_tags import AlgorithmType class Catch22Clusterer(BaseClusterer): @@ -94,13 +94,13 @@ class Catch22Clusterer(BaseClusterer): _tags = { "X_inner_type": [ - ClusteringAlgorithmType.NP_LIST.value, - ClusteringAlgorithmType.NUMPY3D.value, + AlgorithmType.NP_LIST.value, + AlgorithmType.NUMPY3D.value, ], "capability:multivariate": True, "capability:unequal_length": True, "capability:multithreading": True, - "algorithm_type": ClusteringAlgorithmType.FEATURE.value, + "algorithm_type": AlgorithmType.FEATURE.value, } def __init__( diff --git a/aeon/clustering/feature_based/_summary.py b/aeon/clustering/feature_based/_summary.py index 62d62fb99c..6aa4484ee8 100644 --- a/aeon/clustering/feature_based/_summary.py +++ b/aeon/clustering/feature_based/_summary.py @@ -11,8 +11,8 @@ from aeon.base._base import _clone_estimator from aeon.clustering import BaseClusterer -from aeon.clustering._clustering_tags import ClusteringAlgorithmType from aeon.transformations.collection.feature_based import SevenNumberSummary +from aeon.utils.tags._enum_tags import AlgorithmType class SummaryClusterer(BaseClusterer): @@ -65,7 +65,7 @@ class SummaryClusterer(BaseClusterer): _tags = { "capability:multivariate": True, "capability:multithreading": True, - "algorithm_type": ClusteringAlgorithmType.FEATURE.value, + "algorithm_type": AlgorithmType.FEATURE.value, } def __init__( diff --git a/aeon/clustering/feature_based/_tsfresh.py b/aeon/clustering/feature_based/_tsfresh.py index 59970cef81..d9bfd48004 100644 --- a/aeon/clustering/feature_based/_tsfresh.py +++ b/aeon/clustering/feature_based/_tsfresh.py @@ -14,8 +14,8 @@ from aeon.base._base import _clone_estimator from aeon.clustering import BaseClusterer -from aeon.clustering._clustering_tags import ClusteringAlgorithmType from aeon.transformations.collection.feature_based import TSFresh +from aeon.utils.tags._enum_tags import AlgorithmType class TSFreshClusterer(BaseClusterer): @@ -75,8 +75,8 @@ class TSFreshClusterer(BaseClusterer): _tags = { "capability:multivariate": True, "capability:multithreading": True, - "algorithm_type": ClusteringAlgorithmType.FEATURE.value, - "python_dependencies": ClusteringAlgorithmType.TSFRESH.value, + "algorithm_type": AlgorithmType.FEATURE.value, + "python_dependencies": "tsfresh", } def __init__( diff --git a/aeon/utils/tags/_enum_tags.py b/aeon/utils/tags/_enum_tags.py new file mode 100644 index 0000000000..21202b39a1 --- /dev/null +++ b/aeon/utils/tags/_enum_tags.py @@ -0,0 +1,27 @@ +from enum import Enum + + +class AlgorithmType(Enum): + """ + An enumeration of algorithm types and data structures. + + Attributes + ---------- + Algorithm Types: + - DISTANCE: Clustering based on distance metrics + - DEEPLEARNING: Clustering using deep learning techniques + - FEATURE: Clustering driven by feature extraction + + Data Structure Types: + - NP_LIST: Numpy list-based data structure + - NUMPY3D: Three-dimensional Numpy array + """ + + # Algorithm types for clustering strategies + DISTANCE = "distance" + DEEPLEARNING = "deeplearning" + FEATURE = "feature" + + # Data structure types for clustering input + NP_LIST = "np-list" + NUMPY3D = "numpy3D" From fc67481fb47d2865e16a25df92930af8370e654a Mon Sep 17 00:00:00 2001 From: lucifer4073 Date: Sat, 14 Dec 2024 22:23:28 +0530 Subject: [PATCH 09/10] Made enum_tags a public file to fix circular imports --- aeon/clustering/_elastic_som.py | 2 +- aeon/clustering/_k_means.py | 2 +- aeon/clustering/_k_medoids.py | 2 +- aeon/clustering/_k_sc.py | 2 +- aeon/clustering/_k_shape.py | 2 +- aeon/clustering/compose/_pipeline.py | 2 +- aeon/clustering/deep_learning/base.py | 2 +- aeon/clustering/feature_based/_catch22.py | 2 +- aeon/clustering/feature_based/_summary.py | 2 +- aeon/clustering/feature_based/_tsfresh.py | 2 +- aeon/utils/tags/{_enum_tags.py => enum_tags.py} | 2 ++ 11 files changed, 12 insertions(+), 10 deletions(-) rename aeon/utils/tags/{_enum_tags.py => enum_tags.py} (95%) diff --git a/aeon/clustering/_elastic_som.py b/aeon/clustering/_elastic_som.py index 104b66644b..08180c2811 100644 --- a/aeon/clustering/_elastic_som.py +++ b/aeon/clustering/_elastic_som.py @@ -6,7 +6,7 @@ from aeon.clustering.base import BaseClusterer from aeon.distances import get_alignment_path_function, pairwise_distance -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType VALID_ELASTIC_SOM_METRICS = [ "dtw", diff --git a/aeon/clustering/_k_means.py b/aeon/clustering/_k_means.py index 5dd6c52ba4..f2c6bb3a7c 100644 --- a/aeon/clustering/_k_means.py +++ b/aeon/clustering/_k_means.py @@ -2,7 +2,7 @@ from typing import Optional -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType __maintainer__ = [] diff --git a/aeon/clustering/_k_medoids.py b/aeon/clustering/_k_medoids.py index 9b2606d48f..c6003c4251 100644 --- a/aeon/clustering/_k_medoids.py +++ b/aeon/clustering/_k_medoids.py @@ -2,7 +2,7 @@ from typing import Optional -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType __maintainer__ = [] diff --git a/aeon/clustering/_k_sc.py b/aeon/clustering/_k_sc.py index b5d65d969c..f243b6a9b9 100644 --- a/aeon/clustering/_k_sc.py +++ b/aeon/clustering/_k_sc.py @@ -6,7 +6,7 @@ from numpy.random import RandomState from aeon.clustering import TimeSeriesKMeans -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType class KSpectralCentroid(TimeSeriesKMeans): diff --git a/aeon/clustering/_k_shape.py b/aeon/clustering/_k_shape.py index 5ba6ccdb52..b1b53084b1 100644 --- a/aeon/clustering/_k_shape.py +++ b/aeon/clustering/_k_shape.py @@ -6,7 +6,7 @@ from numpy.random import RandomState from aeon.clustering.base import BaseClusterer -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType class TimeSeriesKShape(BaseClusterer): diff --git a/aeon/clustering/compose/_pipeline.py b/aeon/clustering/compose/_pipeline.py index 6de3b019d7..be76dc61a5 100644 --- a/aeon/clustering/compose/_pipeline.py +++ b/aeon/clustering/compose/_pipeline.py @@ -6,7 +6,7 @@ from aeon.base._estimators.compose.collection_pipeline import BaseCollectionPipeline from aeon.clustering import BaseClusterer -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType class ClustererPipeline(BaseCollectionPipeline, BaseClusterer): diff --git a/aeon/clustering/deep_learning/base.py b/aeon/clustering/deep_learning/base.py index d339907614..f946ed9f4d 100644 --- a/aeon/clustering/deep_learning/base.py +++ b/aeon/clustering/deep_learning/base.py @@ -8,7 +8,7 @@ from aeon.base._base import _clone_estimator from aeon.clustering._k_means import TimeSeriesKMeans from aeon.clustering.base import BaseClusterer -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType class BaseDeepClusterer(BaseClusterer): diff --git a/aeon/clustering/feature_based/_catch22.py b/aeon/clustering/feature_based/_catch22.py index 3b63e0a63b..03d142fbb1 100644 --- a/aeon/clustering/feature_based/_catch22.py +++ b/aeon/clustering/feature_based/_catch22.py @@ -12,7 +12,7 @@ from aeon.base._base import _clone_estimator from aeon.clustering import BaseClusterer from aeon.transformations.collection.feature_based import Catch22 -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType class Catch22Clusterer(BaseClusterer): diff --git a/aeon/clustering/feature_based/_summary.py b/aeon/clustering/feature_based/_summary.py index 6aa4484ee8..7299edccbd 100644 --- a/aeon/clustering/feature_based/_summary.py +++ b/aeon/clustering/feature_based/_summary.py @@ -12,7 +12,7 @@ from aeon.base._base import _clone_estimator from aeon.clustering import BaseClusterer from aeon.transformations.collection.feature_based import SevenNumberSummary -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType class SummaryClusterer(BaseClusterer): diff --git a/aeon/clustering/feature_based/_tsfresh.py b/aeon/clustering/feature_based/_tsfresh.py index d9bfd48004..ad61efe0ce 100644 --- a/aeon/clustering/feature_based/_tsfresh.py +++ b/aeon/clustering/feature_based/_tsfresh.py @@ -15,7 +15,7 @@ from aeon.base._base import _clone_estimator from aeon.clustering import BaseClusterer from aeon.transformations.collection.feature_based import TSFresh -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType class TSFreshClusterer(BaseClusterer): diff --git a/aeon/utils/tags/_enum_tags.py b/aeon/utils/tags/enum_tags.py similarity index 95% rename from aeon/utils/tags/_enum_tags.py rename to aeon/utils/tags/enum_tags.py index 21202b39a1..adbf87852c 100644 --- a/aeon/utils/tags/_enum_tags.py +++ b/aeon/utils/tags/enum_tags.py @@ -1,3 +1,5 @@ +"""Apply Enumeration in module.""" + from enum import Enum From 012856969334baa9d85e113b5d283c78618b08c9 Mon Sep 17 00:00:00 2001 From: lucifer4073 Date: Tue, 17 Dec 2024 14:15:00 +0530 Subject: [PATCH 10/10] Modified tags_init and enum_tags file --- aeon/utils/tags/__init__.py | 2 ++ aeon/utils/tags/enum_tags.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/aeon/utils/tags/__init__.py b/aeon/utils/tags/__init__.py index cd506c4460..17fc313f81 100644 --- a/aeon/utils/tags/__init__.py +++ b/aeon/utils/tags/__init__.py @@ -1,6 +1,7 @@ """Estimator tags and tag utilities.""" __all__ = [ + "AlgorithmType", "ESTIMATOR_TAGS", "check_valid_tags", "all_tags_for_estimator", @@ -9,3 +10,4 @@ from aeon.utils.tags._discovery import all_tags_for_estimator from aeon.utils.tags._tags import ESTIMATOR_TAGS from aeon.utils.tags._validate import check_valid_tags +from aeon.utils.tags.enum_tags import AlgorithmType diff --git a/aeon/utils/tags/enum_tags.py b/aeon/utils/tags/enum_tags.py index adbf87852c..eabb943c45 100644 --- a/aeon/utils/tags/enum_tags.py +++ b/aeon/utils/tags/enum_tags.py @@ -1,5 +1,7 @@ """Apply Enumeration in module.""" +__all__ = ["AlgorithmType"] + from enum import Enum