get_control_variate_rsquared¶
-
pyapprox.control_variate_monte_carlo.
get_control_variate_rsquared
(cov)[source]¶ Compute r2 used to compute the variance reduction of control variate Monte Carlo
γ=1−r2,r2=cTC−1cwhere 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 r2