[英]How to interpret large Mean Absolute/Squared Error in a regression model on sklearn
I am new to ML and trying understand evaluation metrics for regression.我是 ML 的新手,正在尝试了解回归的评估指标。 I found Mean Absoulute Error, Mean Squared Error and R2 Score are commonly used for regression.
我发现平均绝对误差、均方误差和 R2 分数通常用于回归。 I have the following y_true and y_pred values for a beginner level regression task:
对于初级回归任务,我有以下 y_true 和 y_pred 值:
Now, the MAE and MSE showing the following results:现在,MAE 和 MSE 显示以下结果:
metrics.mean_absolute_error(y_true,y_pred) #Result: 15000.0 metrics.mean_squared_error(y_true,y_pred) #Result: 225000000.0 metrics.r2_score(y_test,y_pred) #Result: 0.5555
Why the results are so large?为什么结果这么大? I thought the result would be something like 0.0 to 1.0.
我以为结果会是 0.0 到 1.0。 Moreover, I thought it would give an error rate between 0.0 to 1.0.
此外,我认为它会给出 0.0 到 1.0 之间的错误率。 Now how do I interpret this large number regarding my model's performance?
现在我如何解释这个关于我的模型性能的大数字? Thank you.
谢谢你。
In case of mean absolute and squared error, the score results will be large since it is making the difference between the mean of normal outputs and predicted outputs在平均绝对误差和平方误差的情况下,得分结果会很大,因为它在正常输出和预测输出的平均值之间产生差异
For example, mean absolute error = y_true - y_pred and, mean squared error = (y_true - y_pred)^2例如,平均绝对误差 = y_true - y_pred 和,均方误差 = (y_true - y_pred)^2
These results are bound to become more than 1. Being larger than 1 doesn't make them less important, they are both useful to remove cases for predictions returning negative values.这些结果必然会大于 1。大于 1 并不会使它们不那么重要,它们都有助于删除预测返回负值的情况。
For the case of r2_score, it will find the percentage of accuracy of your model using the prediction output and normal output, which is why its range is between 0 and 1对于 r2_score 的情况,它会使用预测 output 和正常 output 找到你的 model 的准确率百分比,这就是为什么它的范围在 0 和 1 之间
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.