nci / scores

scores: Metrics for the verification, evaluation and optimisation of forecasts, predictions or models.
https://scores.readthedocs.io/
Apache License 2.0
67 stars 18 forks source link

Review docstring and possibly raise a userwarning for pearsonr based on preserve_dims=all #703

Open tennlee opened 1 month ago

tennlee commented 1 month ago

Issue: pearsonr may be mathematically undefined when all dimensions are preserved, resulting in NaNs being returned. This isn't exactly wrong, but is perhaps not what a user would be expecting and could be made clearer

Solution: This should at least be documented, and possibly a user warning should also be raised in the code

See also: KGE uses pearsonr in its calculation so is also affected - it has this described in the docstring

nicholasloveday commented 1 month ago

I think a user warning is a good idea