WeCodeAcademy

Measuring Error

How wrong is a model? Compare the true answers with the predictions.

  • MAE (mean absolute error): the average size of the mistakes.
  • MSE (mean squared error): squares each mistake first, so big mistakes count extra.
  • RMSE: the square root of MSE, in the same units as the answer.
  • R squared: 1.0 is perfect, 0 is no better than the average.
Examplepython
Open in editor »
Quick check

Which metric is in the same units as the thing being predicted and does not square the errors?

Your turn: write the code

Print the mean absolute error for these predictions.

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.