diff --git a/aeon/classification/feature_based/_catch22.py b/aeon/classification/feature_based/_catch22.py index bec5deff88..26a56d0a91 100644 --- a/aeon/classification/feature_based/_catch22.py +++ b/aeon/classification/feature_based/_catch22.py @@ -43,8 +43,11 @@ class Catch22Classifier(BaseClassifier): true. If a List of specific features to extract is provided, "Mean" and/or "StandardDeviation" must be added to the List to extract these features. outlier_norm : bool, optional, default=False - Normalise each series during the two outlier Catch22 features, which can take a - while to process for large values. + If True, each time series is normalized during the computation of the two + outlier Catch22 features, which can take a while to process for large values + as it depends on the max value in the timseries. Note that this parameter + did not exist in the original publication/implementation as they used time + series that were already normalized. replace_nans : bool, default=True Replace NaN or inf values from the Catch22 transform with 0. use_pycatch22 : bool, default=False @@ -136,7 +139,7 @@ def __init__( self, features="all", catch24=True, - outlier_norm=False, + outlier_norm=True, replace_nans=True, use_pycatch22=False, estimator=None, diff --git a/aeon/clustering/feature_based/_catch22.py b/aeon/clustering/feature_based/_catch22.py index 33f0b79bc5..30fad7ff7e 100644 --- a/aeon/clustering/feature_based/_catch22.py +++ b/aeon/clustering/feature_based/_catch22.py @@ -42,9 +42,12 @@ class Catch22Clusterer(BaseClusterer): Extract the mean and standard deviation as well as the 22 Catch22 features if true. If a List of specific features to extract is provided, "Mean" and/or "StandardDeviation" must be added to the List to extract these features. - outlier_norm : bool, optional, default=False - Normalise each series during the two outlier Catch22 features, which can take a - while to process for large values. + outlier_norm : bool, optional, default=False + If True, each time series is normalized during the computation of the two + outlier Catch22 features, which can take a while to process for large values + as it depends on the max value in the timseries. Note that this parameter + did not exist in the original publication/implementation as they used + time series that were already normalized. replace_nans : bool, default=True Replace NaN or inf values from the Catch22 transform with 0. use_pycatch22 : bool, default=False @@ -103,7 +106,7 @@ def __init__( self, features="all", catch24=True, - outlier_norm=False, + outlier_norm=True, replace_nans=True, use_pycatch22=False, estimator=None, diff --git a/aeon/regression/feature_based/_catch22.py b/aeon/regression/feature_based/_catch22.py index f669cbe876..1ab04ee6e1 100644 --- a/aeon/regression/feature_based/_catch22.py +++ b/aeon/regression/feature_based/_catch22.py @@ -43,8 +43,11 @@ class Catch22Regressor(BaseRegressor): True. If a List of specific features to extract is provided, "Mean" and/or "StandardDeviation" must be added to the List to extract these features. outlier_norm : bool, optional, default=False - Normalise each series during the two outlier Catch22 features, which can take a - while to process for large values. + If True, each time series is normalized during the computation of the two + outlier Catch22 features, which can take a while to process for large values + as it depends on the max value in the timseries. Note that this parameter + did not exist in the original publication/implementation as they used time + series that were already normalized. replace_nans : bool, optional, default=True Replace NaN or inf values from the Catch22 transform with 0. use_pycatch22 : bool, optional, default=False @@ -110,7 +113,7 @@ def __init__( self, features="all", catch24=True, - outlier_norm=False, + outlier_norm=True, replace_nans=True, use_pycatch22=False, estimator=None, diff --git a/aeon/transformations/collection/feature_based/_catch22.py b/aeon/transformations/collection/feature_based/_catch22.py index daae46f583..0431da8df1 100644 --- a/aeon/transformations/collection/feature_based/_catch22.py +++ b/aeon/transformations/collection/feature_based/_catch22.py @@ -111,8 +111,11 @@ class Catch22(BaseCollectionTransformer): true. If a List of specific features to extract is provided, "Mean" and/or "StandardDeviation" must be added to the List to extract these features. outlier_norm : bool, optional, default=False - Normalise each series during the two outlier Catch22 features, which can take a - while to process for large values. + If True, each time series is normalized during the computation of the two + outlier Catch22 features, which can take a while to process for large values + as it depends on the max value in the timseries. Note that this parameter + did not exist in the original publication/implementation as they used time + series that were already normalized. replace_nans : bool, default=False Replace NaN or inf values from the Catch22 transform with 0. use_pycatch22 : bool, optional, default=False @@ -163,7 +166,7 @@ class Catch22(BaseCollectionTransformer): [1.15639531e+00 1.31700577e+00 5.66227710e-01 2.00000000e+00 3.89048349e-01 2.33853577e-01 1.00000000e+00 3.00000000e+00 8.23045267e-03 0.00000000e+00 1.70859420e-01 2.00000000e+00 - 1.00000000e+00 2.00000000e-01 0.00000000e+00 1.10933565e-32 + 1.00000000e+00 7.00000000e-01 2.00000000e-01 1.10933565e-32 4.00000000e+00 2.04319187e+00 0.00000000e+00 0.00000000e+00 1.96349541e+00 5.51667002e-01] """ @@ -181,7 +184,7 @@ def __init__( self, features="all", catch24=False, - outlier_norm=False, + outlier_norm=True, replace_nans=False, use_pycatch22=False, n_jobs=1, diff --git a/aeon/transformations/collection/feature_based/tests/test_catch22.py b/aeon/transformations/collection/feature_based/tests/test_catch22.py index 5b5bc28925..9ebc67866a 100644 --- a/aeon/transformations/collection/feature_based/tests/test_catch22.py +++ b/aeon/transformations/collection/feature_based/tests/test_catch22.py @@ -120,7 +120,7 @@ def test_catch22_wrapper_on_basic_motions(): 0.0616, 1.0, 0.5, - -0.2, + -0.2799, 0.04, 0.4158, 4.0, @@ -231,7 +231,7 @@ def test_catch22_wrapper_on_basic_motions(): 2.0, 1.0, -0.11, - -0.72, + -0.81, 1.7181, 8.0, 1.8142, @@ -255,7 +255,7 @@ def test_catch22_wrapper_on_basic_motions(): 4.0, 0.3333, -0.15, - 0.03, + 0.01, 32.285, 8.0, 1.9501, @@ -298,8 +298,8 @@ def test_catch22_wrapper_on_basic_motions(): 0.1303, 3.0, 0.3333, - -0.23, - -0.04, + -0.2299, + 0.06, 14.3938, 5.0, 2.0059, @@ -320,8 +320,8 @@ def test_catch22_wrapper_on_basic_motions(): 0.1047, 2.0, 0.3333, - 0.15, - -0.18, + 0.06, + -0.235, 7.1407, 6.0, 2.0097, @@ -342,7 +342,7 @@ def test_catch22_wrapper_on_basic_motions(): 0.064, 1.0, 0.3333, - 0.18, + 0.20, 0.3, 1.6007, 5.0, @@ -365,7 +365,7 @@ def test_catch22_wrapper_on_basic_motions(): 2.0, 0.3333, -0.14, - 0.1, + -0.0399, 7.3076, 5.0, 1.9736, @@ -389,7 +389,7 @@ def test_catch22_wrapper_on_basic_motions(): 2.0, 0.3333, -0.13, - 0.02, + -0.3399, 0.0081, 5.0, 2.133, @@ -410,8 +410,8 @@ def test_catch22_wrapper_on_basic_motions(): 0.5715, 2.0, 1.0, - -0.12, - -0.02, + -0.1399, + -0.0099, 0.1288, 7.0, 1.9505, @@ -476,8 +476,8 @@ def test_catch22_wrapper_on_basic_motions(): 6.8497, 2.0, 0.3333, - -0.06, - 0.05, + -0.0799, + 0.03, 0.0013, 7.0, 2.039, @@ -498,8 +498,8 @@ def test_catch22_wrapper_on_basic_motions(): 3.1416, 2.0, 1.0, - -0.155, - 0.125, + -0.1999, + 0.1200, 0.0212, 7.0, 1.8706, @@ -522,7 +522,7 @@ def test_catch22_wrapper_on_basic_motions(): 0.1723, 1.0, 1.0, - -0.01, + -0.0799, -0.17, 8.3186, 5.0, @@ -544,8 +544,8 @@ def test_catch22_wrapper_on_basic_motions(): 0.1222, 1.0, 1.0, - 0.09, - 0.01, + 0.08, + -0.0099, 5.3016, 4.0, 2.0075, @@ -566,8 +566,8 @@ def test_catch22_wrapper_on_basic_motions(): 0.0841, 2.0, 0.5, - 0.13, - -0.08, + -0.0199, + -0.1199, 1.7627, 5.0, 2.1476, @@ -611,7 +611,7 @@ def test_catch22_wrapper_on_basic_motions(): 1.0, 0.5, -0.05, - -0.11, + -0.0999, 0.2086, 6.0, 2.0597, @@ -656,8 +656,8 @@ def test_catch22_wrapper_on_basic_motions(): 0.0718, 1.0, 0.3333, - 0.03, - 0.13, + 0.025, + -0.1399, 0.501, 6.0, 2.0492, @@ -701,7 +701,7 @@ def test_catch22_wrapper_on_basic_motions(): 2.0, 0.5, -0.13, - 0.19, + 0.29, 0.3096, 6.0, 1.8881, @@ -745,7 +745,7 @@ def test_catch22_wrapper_on_basic_motions(): 3.0, 1.0, 0.11, - 0.35, + 0.285, 0.2719, 7.0, 1.7647,