estimate_model_ensemble_covariance

pyapprox.control_variate_monte_carlo.estimate_model_ensemble_covariance(npilot_samples, generate_samples, model_ensemble)[source]

Estimate the covariance of a model ensemble from a set of pilot samples

Parameters
npilot_samplesinteger

The number of samples used to estimate the covariance

generate_samplescallable

Function used to generate realizations of the random variables with call signature samples = generate_samples(npilot_samples)

model_emsemblecallable

Function that takes a set of samples and models ids and evaluates a set of models. See ModelEnsemble. call signature values = model_emsemble(samples)

Returns
covnp.ndarray (nqoi,nqoi)

The covariance between the model qoi

pilot_random_samplesnp.ndarray (nvars,npilot_samples)

The random samples used to compute the covariance. These samples DO NOT have a model id

pilot_valuesnp.ndaray (npilot_samples,nmodels)

The values of each model at the pilot samples