ChiExp Documentation

A package to compute the expectation value of the \(\chi^2\) defined from arbitrary weight matrices \(W\)

\[\chi^2 = \sum_{i,j} [y_i - f(x_i,a)] W_{ij} [y_j - f(x_j,a)]\]

The implementation is based on the results of Ref. [1] and we summarize below the main equation

\[\langle \chi^2 \rangle = \mathrm{tr} \ \big[C_W W^{1/2} (1-P) W^{1/2} \big] \,, \quad C_W = W^{1/2} C W^{1/2}\]

with \(C\) being the covariance matrix and \(P\) a projector, defined from the function \(f\) and its derivatives computed at the minimum of the \(\chi^2\) (for more details read Ref. [1]).

Autocorrelations can be taken into account in a straight-forward manner by replacing

\[C_{ij} = \frac{1}{N} \sum_{t=-\infty}^\infty \Gamma_{ij}(t) \,,\]

with \(N\) the number of configurations and \(\Gamma\) the autocorrelation function.

The package contains libraries for both Matlab and Python.

The documentation can be found here

Further details can be found by typing help chiexp in Matlab or help(chisquare) in Python.

References