[Numpy-discussion] Requesting Code Review of weighted covariance ENH

tpoole t.b.poole at gmail.com
Mon Aug 4 11:47:50 EDT 2014


Hi everyone,

I've added the ability to handle weighted data in a covariance calculation,
in a similar manner to that already implemented for the calculation of a
weighted average.

https://github.com/tpoole/numpy/compare/weighted_cov

Could an experienced someone please look over my changes before I submit a
pull request?

Validation of the formula can be found at 

"Exponential smoothing weighted correlations", F. Pozzi, T. Matteo, and T.
Aste, Eur. Phys. J. B. 85, 175 (2012).  --- though it is unfortunately
paywalled

and

"An Analysis of WinCross, SPSS, and Mentor Procedures for Estimating the
Variance of a Weighted Mean", A. Madansky and H. G. B. Alexander, 
www.analyticalgroup.com/download/weighted_variance.pdf

for the "effective number of samples".

Thanks,

Tom



--
View this message in context: http://numpy-discussion.10968.n7.nabble.com/Requesting-Code-Review-of-weighted-covariance-ENH-tp38292.html
Sent from the Numpy-discussion mailing list archive at Nabble.com.



More information about the NumPy-Discussion mailing list