1
$\begingroup$

I have two machine learning model, the model result different error value in MAE and MSE. M1 have smallest MAE, but M2 have smallest MSE.

enter image description here

Can anyone explain to me, why this happen? I also add my actual and predicted data here.

Thank You

$\endgroup$

1 Answer 1

1
$\begingroup$

MAE gives the mean error value across all the test instances, while MSE squares the error value before taking the mean. This has the effect of making large errors penalized more strongly with MSE than with MAE.

Example: let's say that 4 instances have error 3, 4, 1, 5

  • MAE = 13/4 = 3.25
  • MSE = 51/4 = 12.75

Now suppose we add an instance with error 20:

  • MAE = 33/5=6.6
  • MSE = 451/5=90.2

Note that the MAE doubles, but the MSE is 7 times higher because the large error has more effect.

In your example, one could say that M1 is better than M2 in average but M2 is better than M1 about minimizing the largest errors (although not by much).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.