From e9174332e04010591efba986986db2aa743cc5ed Mon Sep 17 00:00:00 2001 From: Harshitha Sudhakar <111514477+harshithasudhakar@users.noreply.github.com> Date: Sat, 13 Jul 2024 17:28:20 +0530 Subject: [PATCH] added catch22regressor --- .../expected_regressor_outputs.py | 30 +++++++++++++++++++ .../regressor_results_reproduction.py | 10 +++++-- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/aeon/testing/expected_results/expected_regressor_outputs.py b/aeon/testing/expected_results/expected_regressor_outputs.py index ea6b6c3da1..f31ce17cd0 100644 --- a/aeon/testing/expected_results/expected_regressor_outputs.py +++ b/aeon/testing/expected_results/expected_regressor_outputs.py @@ -38,3 +38,33 @@ 0.4744, ] ) + +covid_3month_preds["Catch22Regressor"] = np.array( + [ + 0.0302, + 0.0354, + 0.0352, + 0.0345, + 0.0259, + 0.0484, + 0.0369, + 0.0827, + 0.0737, + 0.0526, + ] +) + +cardano_sentiment_preds["Catch22Regressor"] = np.array( + [ + 0.2174, + 0.1394, + 0.3623, + 0.1496, + 0.3502, + 0.2719, + 0.1378, + 0.076, + 0.0587, + 0.3773, + ] +) diff --git a/aeon/testing/expected_results/regressor_results_reproduction.py b/aeon/testing/expected_results/regressor_results_reproduction.py index f1f6033311..5a1ee59a13 100644 --- a/aeon/testing/expected_results/regressor_results_reproduction.py +++ b/aeon/testing/expected_results/regressor_results_reproduction.py @@ -4,7 +4,7 @@ from sklearn.utils._testing import set_random_state from aeon.datasets import load_cardano_sentiment, load_covid_3month -from aeon.regression.feature_based import FreshPRINCERegressor +from aeon.regression.feature_based import FreshPRINCERegressor, Catch22Regressor def _reproduce_regression_covid_3month(estimator): @@ -42,9 +42,13 @@ def _print_results_for_regressor(regressor_name, dataset_name): regressor = FreshPRINCERegressor.create_test_instance( parameter_set="results_comparison" ) + elif regressor_name == "Catch22Regressor": + regressor = Catch22Regressor.create_test_instance( + parameter_set="results_comparison" + ) else: raise ValueError(f"Unknown regressor: {regressor_name}") - + if dataset_name == "Covid3Month": data_function = _reproduce_regression_covid_3month elif dataset_name == "CardanoSentiment": @@ -62,4 +66,4 @@ def _print_results_for_regressor(regressor_name, dataset_name): if __name__ == "__main__": # change as required when adding new classifiers, datasets or updating results - _print_results_for_regressor("FreshPRINCERegressor", "Covid3Month") + _print_results_for_regressor("Catch22Regressor", "CardanoSentiment")