get_rsquared_mfmc

pyapprox.control_variate_monte_carlo.get_rsquared_mfmc(cov, nsample_ratios)[source]

Compute r^2 used to compute the variance reduction of Multifidelity Monte Carlo (MFMC)

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
rsquaredfloat

The value r^2