get_control_variate_rsquared

pyapprox.control_variate_monte_carlo.get_control_variate_rsquared(cov)[source]

Compute \(r^2\) used to compute the variance reduction of control variate Monte Carlo

\[\gamma = 1-r^2, \qquad r^2 = c^TC^{-1}c\]

where c is the first column of C

Parameters
covnp.ndarray (nmodels,nmodels)

The covariance C between each of the models. The highest fidelity model is the first model, i.e its variance is cov[0,0]

Returns
rsquaredfloat

The value \(r^2\)