# solarforecastarbiter.metrics.calculator.calculate_probabilistic_metrics¶

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

Calculate probabilistic metrics for the processed data using the provided categories and metric types. Will calculate distribution metrics (e.g., Continuous Ranked Probability Score (CRPS)) over all constant values if forecast is a datamodel.ProbabilisticForecast is provided, or single value metrics (e.g., Briar Score (BS)) if forecast is a datamodel.ProbabilisticForecastConstantValue.

Parameters: processed_fx_obs (datamodel.ProcessedForecastObservation) – Forecasts must be datamodel.ProbabilisticForecast (CDFs) or datamodel.ProbabilisticForecastConstantValue (single values) categories (list of str) – List of categories to compute metrics over. metrics (list of str) – List of metrics to be computed. datamodel.MetricsResult RuntimeError – If there is no forecast, observation timeseries data or no metrics are specified. ValueError – If original and reference forecast axis values do not match.