get_variance_reduction

pyapprox.control_variate_monte_carlo.get_variance_reduction(get_rsquared, cov, nsample_ratios)[source]

Compute the variance reduction:

\[\gamma = 1-r^2\]
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]

nsample_ratiosnp.ndarray (nmodels-1)

The sample ratios r used to specify the number of samples of the lower fidelity models, e.g. N_i = r_i*nhf_samples, i=1,…,nmodels-1

Returns
gammafloat

The variance reduction