solarforecastarbiter.metrics.event.critical_success_index¶
-
solarforecastarbiter.metrics.event.
critical_success_index
(obs, fx)[source]¶ Critical Success Index (CSI).
\[\text{CSI} = \text{TP} / (\text{TP} + \text{FP} + \text{FN})\]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: csi (float) – The CSI 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.