climpred.metrics._unconditional_bias

climpred.metrics._unconditional_bias#

climpred.metrics._unconditional_bias(forecast: Dataset, verif: Dataset, dim: str | List[str] | None = None, **metric_kwargs: Any) Dataset[source]#

Unconditional additive bias.

\text{bias} = f - o

Parameters:
  • forecast – Forecast.

  • verif – Verification data.

  • dim – Dimension(s) to perform metric over

  • metric_kwargs – see xarray.mean

Notes

minimum

-∞

maximum

perfect

0.0

orientation

negative

References

Example

>>> HindcastEnsemble.verify(
...     metric="unconditional_bias",
...     comparison="e2o",
...     alignment="same_verifs",
...     dim="init",
... )
<xarray.Dataset>
Dimensions:  (lead: 10)
Coordinates:
  * lead     (lead) int32 1 2 3 4 5 6 7 8 9 10
    skill    <U11 'initialized'
Data variables:
    SST      (lead) float64 -0.01158 -0.02512 -0.0408 ... -0.1322 -0.1445
Attributes:
    prediction_skill_software:     climpred https://climpred.readthedocs.io/
    skill_calculated_by_function:  HindcastEnsemble.verify()
    number_of_initializations:     64
    number_of_members:             10
    alignment:                     same_verifs
    metric:                        unconditional_bias
    comparison:                    e2o
    dim:                           init
    reference:                     []

Conditional bias is removed by HindcastEnsemble.remove_bias().

>>> HindcastEnsemble = HindcastEnsemble.remove_bias(alignment="same_verifs")
>>> HindcastEnsemble.verify(
...     metric="unconditional_bias",
...     comparison="e2o",
...     alignment="same_verifs",
...     dim="init",
... )
<xarray.Dataset>
Dimensions:  (lead: 10)
Coordinates:
  * lead     (lead) int32 1 2 3 4 5 6 7 8 9 10
    skill    <U11 'initialized'
Data variables:
    SST      (lead) float64 3.203e-18 -1.068e-18 ... 2.882e-17 -2.776e-17
Attributes:
    prediction_skill_software:     climpred https://climpred.readthedocs.io/
    skill_calculated_by_function:  HindcastEnsemble.verify()
    number_of_initializations:     64
    number_of_members:             10
    alignment:                     same_verifs
    metric:                        unconditional_bias
    comparison:                    e2o
    dim:                           init
    reference:                     []