gluonts.model.evaluation module#
- class gluonts.model.evaluation.BatchForecast(forecasts: List[Forecast], allow_nan: bool = False)[source]#
Bases:
objectWrapper around
Forecastobjects, that adds a batch dimension to arrays returned by__getitem__, for compatibility withgluonts.ev.- allow_nan: bool = False#
- gluonts.model.evaluation.evaluate_forecasts(forecasts: Iterable[Forecast], *, test_data: TestData, metrics, axis: Optional[Union[int, tuple]] = None, batch_size: int = 100, mask_invalid_label: bool = True, allow_nan_forecast: bool = False, seasonality: Optional[int] = None) DataFrame[source]#
Evaluate
forecastsby comparing them withtest_data, according tometrics.Note
This feature is experimental and may be subject to changes.
The optional
axisarguments controls aggregation of the metrics: -None(default) aggregates across all dimensions -0aggregates across the dataset -1aggregates across the first data dimension (time, in the univariate setting) -2aggregates across the second data dimension (time, in the multivariate setting)Return results as a Pandas
DataFrame.
- gluonts.model.evaluation.evaluate_forecasts_raw(forecasts: Iterable[Forecast], *, test_data: TestData, metrics, axis: Optional[Union[int, tuple]] = None, batch_size: int = 100, mask_invalid_label: bool = True, allow_nan_forecast: bool = False, seasonality: Optional[int] = None) dict[source]#
Evaluate
forecastsby comparing them withtest_data, according tometrics.Note
This feature is experimental and may be subject to changes.
The optional
axisarguments controls aggregation of the metrics: -None(default) aggregates across all dimensions -0aggregates across the dataset -1aggregates across the first data dimension (time, in the univariate setting) -2aggregates across the second data dimension (time, in the multivariate setting)Return results as a dictionary.
- gluonts.model.evaluation.evaluate_model(model: Predictor, *, test_data: TestData, metrics, axis: Optional[Union[int, tuple]] = None, batch_size: int = 100, mask_invalid_label: bool = True, allow_nan_forecast: bool = False, seasonality: Optional[int] = None) DataFrame[source]#
Evaluate
modelwhen applied totest_data, according tometrics.Note
This feature is experimental and may be subject to changes.
The optional
axisarguments controls aggregation of the metrics: -None(default) aggregates across all dimensions -0aggregates across the dataset -1aggregates across the first data dimension (time, in the univariate setting) -2aggregates across the second data dimension (time, in the multivariate setting)Return results as a Pandas
DataFrame.