Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicate function #120

Merged
merged 4 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
]
}
14 changes: 2 additions & 12 deletions sktime/classification/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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):
Expand Down