Regression
Symmetric MAPE
Implemented
regression.smapeDefinition
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
import evalsuite as es
es.smape(y_true_r, y_pred_r)References
- Hyndman, R. J., & Koehler, A. B. (2006). Another look at measures of forecast accuracy. International Journal of Forecasting, 22(4), 679–688.