Machine learning (k-means) in a Sinatra "to-do" app