From 9c449944ca2918af1e647e5652f2ea8d8428edb2 Mon Sep 17 00:00:00 2001 From: Abhishek Pathak <69761436+scorcism@users.noreply.github.com> Date: Mon, 27 Feb 2023 15:04:26 +0530 Subject: [PATCH 1/4] update test_base.py : remove duplicate function [BUG] Remove duplicate function in classification/tests/test_base.py #119 --- sktime/classification/tests/test_base.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sktime/classification/tests/test_base.py b/sktime/classification/tests/test_base.py index 30eb79f090..99bdf85350 100644 --- a/sktime/classification/tests/test_base.py +++ b/sktime/classification/tests/test_base.py @@ -308,16 +308,6 @@ def _create_example_dataframe(cases=5, dimensions=1, length=10): return test_X -def _create_nested_dataframe(cases=5, dimensions=1, length=10): - testy = pd.DataFrame(dtype=np.float32) - for i in range(0, dimensions): - instance_list = [] - for _ in range(0, cases): - instance_list.append(pd.Series(np.random.randn(length))) - testy["dimension_" + str(i + 1)] = instance_list - return testy - - def _create_unequal_length_nested_dataframe(cases=5, dimensions=1, length=10): testy = pd.DataFrame(dtype=np.float32) for i in range(0, dimensions): From aef10cd7ee8f7d8df207270d902af547bf946dfb Mon Sep 17 00:00:00 2001 From: Abhishek Pathak <69761436+scorcism@users.noreply.github.com> Date: Mon, 27 Feb 2023 15:13:27 +0530 Subject: [PATCH 2/4] Update .all-contributorsrc --- .all-contributorsrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index e91dc71760..5877f6b0d4 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -2071,6 +2071,15 @@ "contributions": [ "code" ] + }, + { + "login": "scorcism", + "name": "Abhishek Pathak", + "avatar_url": "https://avatars.githubusercontent.com/u/69761436", + "profile": "https://github.com/scorcism", + "contributions": [ + "bug" + ] } ] } From b96f83e2f9f41644b9f5e35a110c6a112a14f75f Mon Sep 17 00:00:00 2001 From: Abhishek Pathak <69761436+scorcism@users.noreply.github.com> Date: Mon, 27 Feb 2023 15:48:58 +0530 Subject: [PATCH 3/4] fix naming issue Remove duplicate function --- sktime/classification/tests/test_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sktime/classification/tests/test_base.py b/sktime/classification/tests/test_base.py index 99bdf85350..edc6aeb072 100644 --- a/sktime/classification/tests/test_base.py +++ b/sktime/classification/tests/test_base.py @@ -297,7 +297,7 @@ def _check_classifier_input(X, y=None, enforce_min_instances=1): _check_classifier_input(test_X2, test_y1, enforce_min_instances=6) -def _create_example_dataframe(cases=5, dimensions=1, length=10): +def _create_nested_dataframe(cases=5, dimensions=1, length=10): """Create a simple data frame set of time series (X) for testing.""" test_X = pd.DataFrame(dtype=np.float32) for i in range(0, dimensions): From a5c14b1b134900f25fbac55fc656adc27e1ccac9 Mon Sep 17 00:00:00 2001 From: Abhishek Pathak <69761436+scorcism@users.noreply.github.com> Date: Mon, 27 Feb 2023 15:59:48 +0530 Subject: [PATCH 4/4] Update test_base.py --- sktime/classification/tests/test_base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sktime/classification/tests/test_base.py b/sktime/classification/tests/test_base.py index edc6aeb072..088369be90 100644 --- a/sktime/classification/tests/test_base.py +++ b/sktime/classification/tests/test_base.py @@ -276,8 +276,8 @@ def _check_classifier_input(X, y=None, enforce_min_instances=1): _check_classifier_input(test_X2, test_y2) # 2. Test correct: X: pd.DataFrame with 1 (univariate) and 3 cols(multivariate) vs # y:np.array and np.Series - test_X3 = _create_nested_dataframe(5, 1, 10) - test_X4 = _create_nested_dataframe(5, 3, 10) + test_X3 = _create_example_dataframe(5, 1, 10) + test_X4 = _create_example_dataframe(5, 3, 10) _check_classifier_input(test_X3, test_y1) _check_classifier_input(test_X4, test_y1) _check_classifier_input(test_X3, test_y2) @@ -297,7 +297,7 @@ def _check_classifier_input(X, y=None, enforce_min_instances=1): _check_classifier_input(test_X2, test_y1, enforce_min_instances=6) -def _create_nested_dataframe(cases=5, dimensions=1, length=10): +def _create_example_dataframe(cases=5, dimensions=1, length=10): """Create a simple data frame set of time series (X) for testing.""" test_X = pd.DataFrame(dtype=np.float32) for i in range(0, dimensions):