title: K-means distance parameters in Matlab - Varying results
body: <p>I have a matrix I am working with which 300x5000 and I wanted to test which distance calculation parameter is the most effective. I got the following results:</p>
  
  <p>'Sqeuclidean' = 17 iterations, total sum of distances = 25175.4</p>
  
  <p>'Correlation' = 9 iterations, total sum of distances = 32.7</p>
  
  <p>'Cityblock' = 34 iterations, total sum of distances = 105175.3</p>
  
  <p>'Cosine' = 11 iterations, total sum of distances = 11.9</p>
  
  <p>I am having trouble understanding why the results vary so much and how to choose the most effective distance parameter. Any advice? </p>
  
  <p>EDIT:</p>
  
  <p>I have 300 features with 5000 instances of each feature. 
  the function looks like this:</p>
  
  <p>[idx, ctrs, sumd, d] = kmeans(matrix, 25, 'distance', 'cityblock', 'replicate', 20)</p>
  
  <p>with interchanging the distance parameter. The features were already normalized.</p>
  
  <p>Thanks!</p>