Zurück zu den Modellen
Metric

IntervalWidth

Interval width for interval predictions, sometimes also known as sharpness.

Applies to interval predictions.

Also known as “sharpness”.

For an interval prediction \(I = [a, b]\) and a ground truth value \(y\), the interval width is defined as

\(W(y, I):= b - a\).

  • evaluate computes the average test sample loss.

  • evaluate_by_index produces the loss sample by test data point.

  • multivariate controls averaging over variables.

  • score_average controls averaging over quantiles/intervals.

Schnellstart

python
from sktime.performance_metrics.forecasting.probabilistic import IntervalWidth

estimator = IntervalWidth(multioutput='uniform_average', score_average=True, coverage=None)

Tags

Fähigkeiten

Eigenschaften

Niedriger ist besserlower_is_better
Ja
Benötigt y_trainrequires-y-train
Nein
Benötigt Benchmark-Vorhersagenrequires-y-pred-benchmark
Nein
Vorhersagetypscitype:y_pred
pred_interval

Parameter(3)

multioutput‘uniform_average’ (default), 1D array-like, or ‘raw_values’

Whether and how to aggregate metric for multivariate (multioutput) data.

  • If 'uniform_average' (default), errors of all outputs are averaged with uniform weight.

  • If 1D array-like, errors are averaged across variables, with values used as averaging weights (same order).

  • If 'raw_values', does not average across variables (outputs), per-variable errors are returned.

score_averagebool, optional, default = True

specifies whether scores for each coverage value should be averaged.

  • If True, metric/loss is averaged over all coverages present in y_pred.

  • If False, metric/loss is not averaged over coverages.

coverage (optional)float, list of float, or 1D array-like, default=None

nominal coverage to evaluate metric at. Can be specified if no explicit coverages are present in the direct use of the metric, for instance in benchmarking via evaluate, or tuning via ForecastingGridSearchCV.