allocate_samples_acv

pyapprox.control_variate_monte_carlo.allocate_samples_acv(cov, costs, target_cost, estimator, standardize=True, initial_guess=None, optim_options=None, optim_method='SLSQP')[source]

Determine the samples to be allocated to each model

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]

costsnp.ndarray (nmodels)

The relative costs of evaluating each model

target_costfloat

The total cost budget

Returns
nhf_samplesinteger

The number of samples of the high fidelity model

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

log10_variancefloat

The base 10 logarithm of the variance of the estimator