climpred.metrics._pearson_r_p_value

climpred.metrics._pearson_r_p_value#

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

Probability that forecast and verification data are linearly uncorrelated.

Two-tailed p value associated with the Pearson product-moment correlation coefficient _pearson_r(), assuming that all samples are independent. Use _pearson_r_eff_p_value() to account for autocorrelation in the forecast and verification data.

Parameters:

Notes

minimum

0.0

maximum

1.0

perfect

1.0

orientation

negative

Example

>>> HindcastEnsemble.verify(
...     metric="pearson_r_p_value",
...     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 5.779e-23 2.753e-21 4.477e-21 ... 8.7e-22 6.781e-21
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:                        pearson_r_p_value
    comparison:                    e2o
    dim:                           init
    reference:                     []