normalize_predict_f function

Return a normalized prediction function