solarforecastarbiter.metrics.deterministic.forecast_skill(obs, fx, ref, error_fnc=<function error>)[source]

Forecast skill (s).

\[s = 1 - \text{RMSE}_\text{fx} / \text{RMSE}_\text{ref}\]

where RMSE_fx is the RMSE of the forecast and RMSE_ref is the RMSE of the reference forecast (e.g. Persistence).

  • obs ((n,) array-like) – Observed values.
  • fx ((n,) array-like) – Forecasted values.
  • ref ((n,) array_like) – Reference forecast values.
  • error_fnc (function) – A function that returns the error, default fx - obs. First argument is obs, second argument is fx.

s (float) – The forecast skill [-] of the forecast relative to a reference forecast.


This function returns 0 if RMSE_fx and RMSE_ref are both 0.