title: Passing distance matrix to k-means clustering in sklearn
body: <p>As per as the <a href="http://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html" rel="noreferrer">sklearn kmeans documentation</a>, it says that k-means requires a matrix of shape=(n_samples, n_features). But I provided a distance matrix of shape=(n_samples,n_samples) where each index holds the distance between two strings. The time series has been converted into strings using the <a href="https://jmotif.github.io/sax-vsm_site/morea/algorithm/SAX.html" rel="noreferrer">SAX</a> representation.</p>
  
  <p>When I ran the clustering with the distance matrix, it gives good result. What can be the possible reason for this? As far as I know, K-medoids is the one which works with distance matrix.</p>