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

[BUG] fix dependent tags of TimeSeriesDBSCAN #6322

Merged
merged 2 commits into from Apr 23, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions sktime/clustering/dbscan.py
Expand Up @@ -104,6 +104,15 @@ def __init__(
]
self.clone_tags(distance, tags_to_clone)

# numba distance in sktime (indexed by string)
# cannot support unequal length data, and require numpy3D input
if isinstance(distance, str):
tags_to_set = {
"X_inner_mtype": "numpy3D",
"capability:unequal_length": False,
}
self.set_tags(**tags_to_set)

self.dbscan_ = None

def _fit(self, X, y=None):
Expand Down
1 change: 1 addition & 0 deletions sktime/dists_kernels/dtw/_dtw_sktime.py
Expand Up @@ -131,6 +131,7 @@ class DtwDist(BasePairwiseTransformerPanel):
# --------------
"symmetric": True, # all the distances are symmetric
"X_inner_mtype": "numpy3D",
"capability:unequal_length": False, # can dist handle unequal length panels?
}

def __init__(
Expand Down
1 change: 1 addition & 0 deletions sktime/dists_kernels/edit_dist.py
Expand Up @@ -123,6 +123,7 @@ class EditDist(BasePairwiseTransformerPanel):
# --------------
"symmetric": True, # all the distances are symmetric
"X_inner_mtype": "numpy3D",
"capability:unequal_length": False, # can dist handle unequal length panels?
}

ALLOWED_DISTANCE_STR = ["lcss", "edr", "erp", "twe"]
Expand Down