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.
Can anyone explain to me, why this happen? I also add my actual and predicted data here.
Thank You
Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field. It only takes a minute to sign up.
Sign up to join this communityI have two machine learning model, the model result different error value in MAE and MSE. M1 have smallest MAE, but M2 have smallest MSE.
Can anyone explain to me, why this happen? I also add my actual and predicted data here.
Thank You
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
Now suppose we add an instance with error 20:
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).