solarforecastarbiter.metrics.calculator.calculate_deterministic_metrics

solarforecastarbiter.metrics.calculator.calculate_deterministic_metrics(processed_fx_obs, categories, metrics)[source]

Calculate deterministic metrics for the processed data using the provided categories and metric types.

Normalization is determined by the attributes of the input objects.

If processed_fx_obs.uncertainty is not None, a deadband equal to the uncertainty will be used by the metrics that support it.

Parameters:
  • processed_fx_obs (datamodel.ProcessedForecastObservation) –
  • categories (list of str) – List of categories to compute metrics over.
  • metrics (list of str) – List of metrics to be computed.
Returns:

solarforecastarbiter.datamodel.MetricResult – Contains all the computed metrics by categories.

Raises:

RuntimeError – If there is no forecast, observation timeseries data or no metrics are specified.