climpred.metrics._mse

Contents

climpred.metrics._mse#

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

Mean Sqaure Error (MSE).

MSE = \overline{(f - o)^{2}}

The average of the squared difference between forecasts and verification data. This incorporates both the variance and bias of the estimator. Because the error is squared, it is more sensitive to large forecast errors than mae, and thus a more conservative metric. For example, a single error of 2°C counts the same as two 1°C errors when using mae. On the other hand, the 2°C error counts double for mse. See Jolliffe and Stephenson, 2011.

Parameters:
  • forecast – Forecast.

  • verif – Verification data.

  • dim – Dimension(s) to perform metric over.

  • metric_kwargs – see xskillscore.mse()

Notes

minimum

0.0

maximum

perfect

0.0

orientation

negative

References

Jolliffe and Stephenson [2011]

Example

>>> HindcastEnsemble.verify(
...     metric="mse", 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.006202 0.006536 0.007771 ... 0.02417 0.02769
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:                        mse
    comparison:                    e2o
    dim:                           init
    reference:                     []