emukit.sensitivity.monte_carlo package

Submodules

class emukit.sensitivity.monte_carlo.monte_carlo_sensitivity.ModelFreeMonteCarloSensitivity(objective, input_domain)

Bases: object

Class to do sensitivity analysis of a function. It computes Monte Carlo approximations to the Sobol indexes and the total variance components of each input variable of some objective of interest.

saltelli_estimators(f_main_sample, f_fixing_sample, f_new_fixing_sample, num_monte_carlo_points, total_mean, total_variance)

Saltelli estimators of the total mean and variance

Return type

Tuple

compute_statistics(sample)

Computes mean and variance of a sample

Parameters

sample (ndarray) – A sample to compute statistics for.

Return type

Tuple

Returns

A tuple (mean, variance).

compute_effects(main_sample=None, fixing_sample=None, num_monte_carlo_points=100000)

Computes the main and total effects using Monte Carlo and a give number of samples. - Main effects: contribution of x_j alone to the variance of f. - Total effects: contribution to all Sobol terms in which x_j is involved to the variance of f.

The (unbiased) Monte Carlo estimates are computed using:

“A. Saltelli, Making best use of model evaluations to compute sensitivity indices, Computer Physics Com. 608 munications, 145 (2002), pp. 280-297”

Parameters
  • main_sample (Optional[ndarray]) – original sample that is used in the Monte Carlo computations.

  • fixing_sample (Optional[ndarray]) – supplementary sample that is used in the Monte Carlo computations.

  • num_monte_carlo_points (int) – number of points used to compute the effects.

Return type

Tuple

Returns

A tuple (main effects, total effects, total variance).

class emukit.sensitivity.monte_carlo.monte_carlo_sensitivity.MonteCarloSensitivity(model, input_domain)

Bases: ModelFreeMonteCarloSensitivity

Class to compute the sensitivity coefficients of given model. This class wraps the model and calls the mean predictions that are used to compute the sensitivity inputs using Monte Carlo.

Module contents