SMAPE#
- class pytorch_forecasting.metrics.point.SMAPE(reduction: str = 'mean', **kwargs)[source]#
Bases:
MultiHorizonMetricSymmetric mean absolute percentage. Assumes
y >= 0.Defined as
2*(y - y_pred).abs() / (y.abs() + y_pred.abs())Initialize metric
- Parameters:
name (str) – metric name. Defaults to class name.
quantiles (List[float], optional) – quantiles for probability range. Defaults to None.
reduction (str, optional) – Reduction, “none”, “mean” or “sqrt-mean”. Defaults to “mean”.
Methods
loss(y_pred, target)Calculate loss without reduction.