Created predictive rating function