Movie Prediction algorithm written in Ruby