This is example code from the talk "Dirt Simple Data Mining" which I gave at the RubyWeb Conf in September 2010. If your interested in reall data mining there is a great resource here: http://www.autonlab.org/tutorials/