from sklearn.metrics import mean_squared_error #均方误差 from sklearn.metrics import mean_absolute_error #平方绝对误差 from sklearn.metrics import r2_score#R square #调用 MSE:mean_squared_error(y_test,y_predict) RMSE:np.sqrt(mean_squared_error(y_test,y_predict)) MAE:mean_absolute_error(y_test,y_predict) R2:r2_score(y_test,y_predict) Adjusted_R2::1-((1-r2_score(y_test,y_predict))*(n-1))/(n-p-1)