Replies: 1 comment 1 reply
-
Thank you for asking this question here. Could you please post a code and small data example (with climpred) that relates to your question? Do you use reference="climatology"? Then look into the option seasonality https://climpred.readthedocs.io/en/stable/api/climpred.options.set_options.html xskillscore.pearson_r does not wrap scipy. xskillscore and scipy don't care about time coords only climpred does. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When computing the Pearson's anomaly correlation coefficient (which uses xskillscore.pearson_r by calling scipy.stats.pearson_r ), does anyone know how the climatology is computed? Would it only be "day of year" climatology? Or does it use the entire time series?
I looked at the source code for pearson_r https://github.com/scipy/scipy/blob/v1.10.1/scipy/stats/_stats_py.py#L4217-L4484, but I wasn't able to gather any information that seemed to point towards how a climatology is created.
In the source code, it appears that it would take the entire time series (for each grid cell), and use that to compute the mean. But I may be misinterpreting this. Any advice would be appreciated.
'''From source'''
import numpy as np
>>> from scipy import stats
>>> res = stats.pearsonr([1, 2, 3, 4, 5], [10, 9, 2.5, 6, 4])
>>> res
PearsonRResult(statistic=-0.7426106572325056, pvalue=0.15055580885344558)
Beta Was this translation helpful? Give feedback.
All reactions