1、预测值与实际值之间的误差(点对点)
1.1 SSE和方差
1.2 MSE(Mean Squared Error)均方差
from sklearn.metrics import mean_squared_error
1.3 RMSE均方根
from sklearn.metrics import mean_squared_error
from math import sqrt
rmse = sqrt(mean_squared_error(y_actual, y_predicted))
1.4 MAE(Mean Absolute Error)平均绝对误差
from sklearn.metrics import mean_absolute_error
1.5 MAPE(Mean Absolute Percentage Error)平均绝对百分误差
2、预测值、实际值与实际值均值之间的误差(点对全)
2.1 R方
from sklearn.metrics import r2_score
2.2 SSR(Sum of squares of the regression)
预测值与实际值均值之差的平方和
2.3 SST(Total sum of squares)
实际值与实际值均值之差的平方和