简体   繁体   English

如何解释 sklearn 回归 model 中的大平均绝对/平方误差

[英]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 值:

y_true | 是的| y_pred y_pred
595000 | 595000 | 550000 550000
610000 | 610000 | 565000 565000

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.

相关问题 为什么是负数(MSE 或 MAS)评分参数(如 SKLEARN 中的 neg_mean_absolute_error)被考虑用于回归 model 评估 - Why is negative (MSE or MAS) Scoring parameter like- neg_mean_absolute_error in SKLEARN is considered for regression model evaluation 如何在Python中计算回归探针的平均绝对百分比误差? - How to calculate mean absolute percentage error for regression probem in Python? Keras 中 CNN 回归任务中奇怪的均方根误差行为 - weird root mean squared error behavior in a CNN regression task in Keras 计算回合的回归均方根误差 - calculate root-mean-squared-error of regression in bouts sklearn大数据的线性回归 - sklearn linear regression for large data tensorflow 中作为损失函数的平均绝对相对误差(回归问题) - Mean absolute relative error as loss function in tensorflow (regression problem) 具有平均绝对误差成本的多项式回归 function Python - Polinomial regression with Mean Absolute Error cost function Python 如何解释逻辑回归模型中的分类表 - How do I interpret a classification table from a logistic regression model 如何在回归模型中提供均值中心变量 - How to supply a mean centered variable in a regression model 如何评估均方误差(MSE)是否合理? - How do I evaluate whether the mean squared error (MSE) is reasonable or not?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM