You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thank you very much for this great library! I have a general question and would appreciate your support:
I have a single univariate time series and I am trying to use the classification algorithm for learning shaplets.
import pandas as pd
import numpy as np
from pyts.classification import LearningShapelets
np.random.seed(42)
random_data = np.random.randn(100)
df = pd.DataFrame({'column': random_data})
X = [df[col].tolist() for col in df.columns]
clf = LearningShapelets(random_state=42)
y = [1]
clf.fit(X, y)
Now, using the following code I can get the shapelets:
clf.shapelets_
Is there also a way to find where those shapelets were identified in the original time series? Ideally, I would like to map the shapelets back onto the original time series.
Thank you very much in advance for your support!
The text was updated successfully, but these errors were encountered:
One cannot perform classification with a single sample. One needs at least one sample from each class, and at least two classes, to perform classification.
Hi,
thank you very much for this great library! I have a general question and would appreciate your support:
I have a single univariate time series and I am trying to use the classification algorithm for learning shaplets.
Now, using the following code I can get the shapelets:
clf.shapelets_
Is there also a way to find where those shapelets were identified in the original time series? Ideally, I would like to map the shapelets back onto the original time series.
Thank you very much in advance for your support!
The text was updated successfully, but these errors were encountered: