get_rsquared_mlmc

pyapprox.control_variate_monte_carlo.get_rsquared_mlmc(cov, nsample_ratios, pkg=<module 'numpy' from '/Users/jdjakem/opt/miniconda3/envs/pyapprox-dev/lib/python3.7/site-packages/numpy/__init__.py'>)[source]

Compute r^2 used to compute the variance reduction of Multilevel Monte Carlo (MLMC)

See Equation 2.24 in ARXIV paper where alpha_i=-1 for all i

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. The values r_i correspond to eta_i in Equation 2.24

Returns
gammafloat

The variance reduction