对于回归预测结果,通常会有平均绝对误差、平均绝对百分比误差、均方误差等多个指标进行评价。这里,我们先介绍最常用的3个
目录
平均绝对误差(MAE)
MAE 的值越小,说明预测模型拥有更好的精确度。The MAE is used to measure the average absolute error between the predicted value and the real value on the experimental data set. For a test set containing n microblog messages, MAE is defined as:
import numpy as np
def mae_value(y_true, y_pred):
"""
参数:
y_true -- 测试集目标真实值
y_p