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.

MetricWithMissingHandling(metric_fn[, mode, ...])

Base class for all the multi-segment metrics that can handle missing values.

Enums:

MetricAggregationMode(value)

Enum for different metric aggregation modes.

MetricMissingMode(value)

Enum for different metric modes of working with missing values.

Scalar metrics:

MAE([mode, missing_mode])

Mean absolute error metric with multi-segment computation support.

MAPE([mode, missing_mode])

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

MSE([mode, missing_mode])

Mean squared error metric with multi-segment computation support.

MSLE([mode, missing_mode])

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

R2([mode, missing_mode])

Coefficient of determination metric with multi-segment computation support.

RMSE([mode, missing_mode])

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

SMAPE([mode, missing_mode])

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

WAPE([mode, missing_mode])

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

MaxDeviation([mode, missing_mode])

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

MedAE([mode, missing_mode])

Median absolute error metric with multi-segment computation support.

Sign([mode, missing_mode])

Sign error metric with multi-segment computation support.

MissingCounter([mode])

Missing values counter 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, ...])

Mean width of prediction intervals.

Utilities:

compute_metrics(metrics, y_true, y_pred)

Compute metrics for given y_true, y_pred.