

Show HN: K-means algorithm in Ruby - stockkid
https://github.com/sungwoncho/k_means_ruby

======
stockkid
I want to improve my coding skills, and decided to build something simple
without using frameworks.

Here's a simple implementation of a famous clustering algorithm in Ruby.
Feedbacks are welcome.

~~~
fundamental
This repository is a good example of trying to abstract something to death in
my opinion. It takes a relatively simple algorithm and breaks it up into far
more pieces than really needed. It also manages to be both incomplete in its
implementation (no iteration until convergence or change<some delta) and
incorrect in implementation as the update step updates the centroid's location
at the incorrect time.

100% coverage is pretty nice to have though.

~~~
stockkid
Thanks. I'm fairly new to OOP and wanted to try it out. Isn't abstraction here
good because it breaks the code into modular pieces? Can you suggest some good
readings? And I agree the algorithm is incomplete.

~~~
wodenokoto
Only if you need those modules outside of your k-means

