Skip to content
EvalSuite
Documentation menu

Regression

Symmetric MAPE

Implementedregression.smape

Definition

Percentage error scaled by the mean magnitude of target and prediction.

Formula

sMAPE = (1/N) Σᵢ 2|yᵢ − ŷᵢ| / (|yᵢ| + |ŷᵢ|)

Range: [0, 2]

Inputs and outputs

  • y_true: array of real targets
  • y_pred: array of real predictions
  • sample_weight: optional

Returns: float

Assumptions

No assumptions beyond valid, aligned inputs of the documented types.

Limitations

  • Several conflicting definitions exist; EvalSuite documents the one it uses.

Python API

PythonSince v0.1.0
import evalsuite as es

es.smape(y_true_r, y_pred_r)

References

  1. Hyndman, R. J., & Koehler, A. B. (2006). Another look at measures of forecast accuracy. International Journal of Forecasting, 22(4), 679–688.

Implementation status