I have time series data of different length of series. I want to cluster based upon DTW distance but could not find ant library regarding it. sklearn
give straight error while tslearn kmeans gave wrong answer.
My problem is solving if I pad it with zeros but I am not sure if this is correct to pad time-series data while clustering.
The suggestion about other clustering technique about time series data are welcomed.
max_length = 0
for i in train_1:
if(len(i)>max_length):
max_length = len(i)
print(max_length)
train_1 = sequence.pad_sequences(train_1, maxlen=max_length)
km3 = TimeSeriesKMeans(n_clusters = 4, metric="dtw",verbose = False,random_state = 0).fit(train_1)
print(km3.labels_)