Metrics#

Module with metrics of forecasting quality.

API details#

Base:

Metric(metric_fn[, mode, metric_fn_signature])

Base class for all the multi-segment metrics.

Enums:

MetricAggregationMode(value)

Enum for different metric aggregation modes.

Scalar metrics:

MAE([mode])

Mean absolute error metric with multi-segment computation support.

MAPE([mode])

Mean absolute percentage error metric with multi-segment computation support.

MSE([mode])

Mean squared error metric with multi-segment computation support.

MSLE([mode])

Mean squared logarithmic error metric with multi-segment computation support.

R2([mode])

Coefficient of determination metric with multi-segment computation support.

RMSE([mode])

Root mean squared error metric with multi-segment computation support.

SMAPE([mode])

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

WAPE([mode])

Weighted average percentage Error metric with multi-segment computation support.

MaxDeviation([mode])

Max Deviation metric with multi-segment computation support (maximum deviation value of cumulative sums).

MedAE([mode])

Median absolute error metric with multi-segment computation support.

Sign([mode])

Sign error metric with multi-segment computation support.

Interval metrics:

Coverage([quantiles, mode, upper_name, ...])

Coverage metric for prediction intervals - precenteage of samples in the interval [lower quantile, upper quantile].

Width([quantiles, mode, upper_name, lower_name])

Mean width of prediction intervals.

Utilities:

compute_metrics(metrics, y_true, y_pred)

Compute metrics for given y_true, y_pred.