k-Nearest Neighbor demonstration in Ruby