SMAPE

class SMAPE(mode: str = MetricAggregationMode.per_segment, **kwargs)[source]

Bases: etna.metrics.base.Metric

Symmetric mean absolute percentage error metric with multi-segment computation support.

\[SMAPE(y\_true, y\_pred) = \frac{2 \cdot 100 \%}{n}\cdot\frac{\sum_{i=0}^{n-1}{\mid y\_true_i - y\_pred_i\mid}}{\mid y\_true_i \mid + \mid y\_pred_i \mid}\]

Notes

You can read more about logic of multi-segment metrics in Metric docs.

Init metric.

Parameters
  • mode ('macro' or 'per-segment') – metrics aggregation mode

  • kwargs – metric’s computation arguments

Inherited-members

Attributes

name

Name of the metric for representation.