Skip to content

Account for weights in block error

sroet requested to merge sroet/pyretis:account_for_weights_error into master

This MR updates the online block error analysis to properly account for weights in the calculation for the covariance

It uses the formula described in equation 39 in https://markusthill.github.io/math/stats/ml/online-estimation-of-weighted-sample-mean-and-coviarance-matrix/

However we delay the cast from w to w_i to after the loop to only loop over the data once.

After that we use the weighted bessel correction as used in pyblock (which uses the "effective sample size" from this document).

A PR where we use this functionality in our actual analysis still has to follow this one

Edited by sroet

Merge request reports