title: How to compute the total sum of squared error in k-mean clustering matlab?
body: <p>I am implementing the k-means algorithm for given 4-dimensional data with k=# of cluster and i am running about 5 times with different initial points. </p>
  
  <ol>
  <li>How can i compute the total sum of squared error (SSE)after each run?</li>
  </ol>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>4 Dimention 1 to 4 and blow
  x1 1 2 3 4
  x2 5 6 7 8
  x3 9 10 11 12
  x4 13 14 15 16
  x5 17 18 19 20</code></pre>
  </div>
  </div>
  </p>
  
  <p>I will be more than happy if anyone can help me with this.
  Thanks</p>