title: How can I find what data is clustering in K-Shape?
body: <p>I wrote codes,</p>
  
  <pre><code>import numpy
  import matplotlib.pyplot as plt
  
  from tslearn.clustering import KShape
  from tslearn.datasets import CachedDatasets
  from tslearn.preprocessing import TimeSeriesScalerMeanVariance
  
  
  ks = KShape(n_clusters=3, n_init=10, verbose=True, random_state=seed)
  y_pred = ks.fit_predict(data)
  
  plt.figure(figsize=(16,9))
  for yi in range(3):
      plt.subplot(3, 1, 1 + yi)
      for xx in stack_data[y_pred == yi]:
          plt.plot(xx.ravel(), "k-", alpha=.2)
      plt.title("Cluster %d" % (yi + 1))
  
  plt.tight_layout()
  plt.show()
  </code></pre>
  
  <p>I want to divide <code>data</code> by usigng KShape’s clustering.Now plot is shown, but I cannot find what data is in each 3 clustering.</p>
  
  <p>data is an order of A,B,C,D ’s kind.So I want to show label to plot or the result of the clustering.I searched KShape’s document  (<a href="http://tslearn.readthedocs.io/en/latest/auto_examples/plot_kshape.html" rel="nofollow noreferrer">http://tslearn.readthedocs.io/en/latest/auto_examples/plot_kshape.html</a> ),but I cannot find the information to do my ideal things.How should I do it?</p>