pearson-correlation

Weighted correlation coefficient with pandas

孤街醉人 提交于 2019-11-29 18:40:01
问题 Is there any way to compute weighted correlation coefficient with pandas? I saw that R has such a method. Also, I'd like to get the p value of the correlation. This I did not find also in R. Link to Wikipedia for explanation about weighted correlation: https://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient#Weighted_correlation_coefficient 回答1: I don't know of any Python packages that implement this, but it should be fairly straightforward to roll your own implementation.