title: What are x , y axis values when not specified for kmeans scikit-learn
body: <p>This code : runs k-means algorithm from scikit-learn package : </p>
  
  <pre><code>from sklearn.cluster import KMeans
  import numpy as np
  from matplotlib import pyplot
  
  X = np.array([[10, 2 , 9], [1, 4 , 3], [1, 0 , 3],
                 [4, 2 , 1], [4, 4 , 7], [4, 0 , 5], [4, 6 , 3],[4, 1 , 7],[5, 2 , 3],[6, 3 , 3],[7, 4 , 13]])
  kmeans = KMeans(n_clusters=3, random_state=0).fit(X)
  
  k = 3
  kmeans.fit(X)
  
  labels = kmeans.labels_
  centroids = kmeans.cluster_centers_
  
  for i in range(k):
      # select only data observations with cluster label == i
      ds = X[np.where(labels==i)]
      # plot the data observations
      pyplot.plot(ds[:,0],ds[:,1],'o')
      # plot the centroids
      lines = pyplot.plot(centroids[i,0],centroids[i,1],'kx')
      # make the centroid x's bigger
      pyplot.setp(lines,ms=15.0)
      pyplot.setp(lines,mew=2.0)
  pyplot.show()
  </code></pre>
  
  <p>generates : </p>
  
  <p><a href="https://i.stack.imgur.com/72VX1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/72VX1.png" alt="enter image description here"></a></p>
  
  <p>As I've not set the x and y axis labels what do these axis values represent ?</p>
  
  <p>scikit-learn utilizes the Euclidian distance measure for computing the distance between each point, so are the axis values representative of the Euclidean distances ?</p>
  
  <p>The doc <a href="http://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html" rel="nofollow noreferrer">http://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html</a> does not describe this scenario.</p>
  
  <p>Update : it does appear to be just plotting first two two dimension in array as using </p>
  
  <pre><code>X = np.array([[10, 2 , 90], [1, 4 , 35], [1, 0 , 30],
                 [4, 2 , 1], [4, 4 , 7], [4, 0 , 5], [4, 6 , 3],[4, 1 , 7],[5, 2 , 3],[6, 3 , 3],[7, 4 , 13]])
  </code></pre>
  
  <p>I've updated the 3'rd dimensions for first 3 parameters to : to 90 , 35 &amp; 40 . This does not have any impact on resultant plot. So in order to visualize dimensions > 2 I should run a PCA analysis on the data.</p>