Skip to content

[BUG] ShapeletTransformClassifier doesn't work with y as pd.Series #321

@mloning

Description

@mloning

Describe the bug
ShapeletTransformClassifier doesn't work with y as pd.Series

To Reproduce
This breaks:

from sktime.classification.shapelet_based import ShapeletTransformClassifier
from sktime.datasets import load_arrow_head
from sklearn.model_selection import train_test_split

X, y = load_arrow_head(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y)

c = ShapeletTransformClassifier()
c.fit(X_train, y_train)

Expected behavior
Works with pd.Series or np.array

Additional context
This works:

from sktime.classification.shapelet_based import ShapeletTransformClassifier
from sktime.datasets import load_arrow_head
from sklearn.model_selection import train_test_split

X, y = load_arrow_head(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y)

c = ShapeletTransformClassifier()
c.fit(X_train, y_train.to_numpy())

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions