> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openlayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mean absolute error (MAE)

> Learn how to use the mean absolute error test

## Definition

The mean absolute error (MAE) test measures the average of the absolute differences between the predicted values and the true values. MAE provides a linear measure of prediction accuracy that is less sensitive to outliers compared to MSE and RMSE.

## Taxonomy

* **Task types**: Tabular regression.
* **Availability**: <Tooltip tip="Continuously evaluate your models and datasets as you iterate on their versions.">development</Tooltip>
  and <Tooltip tip="Monitor a model in production, measure its health, check for drifts and set up alerts.">monitoring</Tooltip>.

## Why it matters

* MAE is expressed in the same units as the target variable, making it highly interpretable.
* Unlike MSE and RMSE, MAE treats all errors equally regardless of their magnitude, making it more robust to outliers.
* Lower MAE values indicate better model performance, with 0 representing perfect predictions.
* MAE provides a straightforward measure of average prediction error that is easy to understand and communicate.

## Required columns

To compute this metric, your dataset must contain the following columns:

* **Predictions**: The predicted values from your regression model
* **Ground truths**: The actual/true target values

## Test configuration examples

If you are writing a `tests.json`, here are a few valid configurations for the MAE test:

<CodeGroup>
  ```json Development theme={null}
  [
    {
      "name": "MAE below 5",
      "description": "Ensure that the mean absolute error is below 5",
      "type": "performance",
      "subtype": "metricThreshold",
      "thresholds": [
        {
          "insightName": "metrics",
          "insightParameters": null,
          "measurement": "mae",
          "operator": "<",
          "value": 5
        }
      ],
      "subpopulationFilters": null,
      "mode": "development",
      "usesValidationDataset": true,
      "usesTrainingDataset": false,
      "usesMlModel": true,
      "syncId": "b4dee7dc-4f15-48ca-a282-63e2c04e0689"
    }
  ]
  ```

  ```json Monitoring theme={null}
  [
    {
      "name": "MAE below 5",
      "description": "Ensure that the mean absolute error is below 5",
      "type": "performance",
      "subtype": "metricThreshold",
      "thresholds": [
        {
          "insightName": "metrics",
          "insightParameters": null,
          "measurement": "mae",
          "operator": "<",
          "value": 5
        }
      ],
      "subpopulationFilters": null,
      "mode": "monitoring",
      "usesProductionData": true,
      "evaluationWindow": 3600,
      "delayWindow": 0,
      "syncId": "b4dee7dc-4f15-48ca-a282-63e2c04e0689"
    }
  ]
  ```
</CodeGroup>

## Related

* [MSE test](/tests/catalog/mse) - Mean squared error (more sensitive to outliers).
* [RMSE test](/tests/catalog/rmse) - Root mean squared error (square root of MSE).
* [R-squared test](/tests/catalog/r2) - Coefficient of determination.
* [MAPE test](/tests/catalog/mape) - Mean absolute percentage error.
* [Aggregate metrics](/tests/performance/aggregate-metrics) - Overview of all available metrics.
