solarforecastarbiter.metrics.event.event_accuracy

solarforecastarbiter.metrics.event.event_accuracy(obs, fx)[source]

Event Accuracy (EA).

\[\text{EA} = (\text{TP} + \text{TN}) / n\]

where n is the number of samples.

Parameters:
  • obs ((n,) array-like) – Observed event values (True=event, False=no event).
  • fx ((n,) array-like) – Forecasted event values (True=event, False=no event).
Returns:

ea (float) – The EA of the forecast.

Raises:

RuntimeError – If there is no forecast or observation timeseries data, or the forecast and observation timeseries data do not have the same length.