Mean absolute error

The average loss per example when L1 loss is used. Calculate MAE as follows:1

  1. Calculate the L1 loss for a batch.
  2. Divide the L1 loss by the number of examples in the batch.
MAE=1ni=0nyiy^i\text{MAE} = \frac{1}{n}\sum_{i=0}^{n} | y_i - \hat{y}_i |

where:

  • nn is the number of examples.
  • yy is the actual value of the label.
  • y^\hat{y} is the value that the model predicts for yy.

See also

Footnotes

  1. developers.google.com/machine-learning/glossary#MAE

2024 © ak