Definition

The mean absolute percentage error (MAPE) test measures the average of the absolute percentage differences between the predicted values and the true values. MAPE expresses prediction accuracy as a percentage, making it scale-independent and easily interpretable.

Taxonomy

  • Task types: Tabular regression.
  • Availability: and .

Why it matters

  • MAPE provides a percentage-based measure of prediction accuracy that is easy to interpret and communicate to stakeholders.
  • Being scale-independent, MAPE allows for comparison of model performance across different datasets and target variables.
  • Lower MAPE values indicate better model performance, with 0% representing perfect predictions.
  • MAPE is particularly useful when the relative size of errors is more important than their absolute magnitude.

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
MAPE is undefined when true values are zero, as this would result in division by zero. Consider using alternative metrics like MAE when your dataset contains zero values.

Test configuration examples

If you are writing a tests.json, here are a few valid configurations for the MAPE test:
[
  {
    "name": "MAPE below 10%",
    "description": "Ensure that the mean absolute percentage error is below 10%",
    "type": "performance",
    "subtype": "metricThreshold",
    "thresholds": [
      {
        "insightName": "metrics",
        "insightParameters": null,
        "measurement": "mape",
        "operator": "<",
        "value": 0.1
      }
    ],
    "subpopulationFilters": null,
    "mode": "development",
    "usesValidationDataset": true,
    "usesTrainingDataset": false,
    "usesMlModel": true,
    "syncId": "b4dee7dc-4f15-48ca-a282-63e2c04e0689"
  }
]