Skip to content

Bug in the evidence from merged runs

The evidence from merged runs is being over estimated due to this line.

To verify this, here is some example code:

In [19]: from scipy.special import logsumexp                                    
In [20]: a = np.array([11, 12, 13])   # Create fake Z's                                          
In [21]: np.sqrt(np.mean(a**2))       # Actual RMS value calculated directly                                       
Out[21]: 12.027745701779143

In [22]: lna = np.log(a)              # Take the natural log                                                
In [23]: np.exp(0.5 * logsumexp(2 * lna, b=1. / len(a))) # This is how the RMS should be calculated                       
Out[23]: 12.027745701779143

In [24]: np.exp(logsumexp(2 * lna, b=1. / len(a))) # This is how we do it currently                          
Out[24]: 144.66666666666666