Tuesday, November 1, 2011

k-means and Octave

In the lecture on unsupervised learning on the Stanford's AI online course, there is the presentation of the k-means algorithm.

The algorithm is simple:

  • Bind each data point to the closest centroid:




  • Adjust each centroid's position to the mean of its bound data points:

  • And  cycle through these until there is no more change


Here is a quick example with random points:


The code is in my github k-means-octave repository.



1 comment:

  1. 2V0-41.19 Exam Dumps Simply make sure your grip on the IT braindumps devised the industry’s best IT professionals and get a 100% guaranteed success in Exam.

    ReplyDelete