Ruby gem for calculate prediction algorithm