def normalized_mean_absolute_error(y_real, y_pred, max_rating, min_rating):
 (y_real, y_pred) = check_arrays(y_real, y_pred)
 mae = mean_absolute_error(y_real, y_pred)
 return (mae / (max_rating - min_rating))

def normalized_mean_absolute_error ( y_real , y_pred , max_rating , min_rating ) : ( y_real , y_pred ) = check_arrays ( y_real , y_pred ) mae = mean_absolute_error ( y_real , y_pred ) return ( mae / ( max_rating - min_rating ) )
it computes the normalized average absolute difference between predicted and actual ratings for users .