gemseo / post / core

robustness_quantifier module

Quantification of robustness of the optimum to variables perturbations

class gemseo.post.core.robustness_quantifier.RobustnessQuantifier(history, approximation_method='SR1')[source]

Bases: object

classdocs

Constructor

Parameters
  • history – an approximation history.

  • approximation_method – an approximation method for the Hessian.

AVAILABLE_APPROXIMATIONS = ['BFGS', 'SR1', 'LEAST_SQUARES']
compute_approximation(funcname, first_iter=0, last_iter=0, b0_mat=None, at_most_niter=- 1, func_index=None)[source]

Builds the BFGS approximation for the hessian

Parameters
  • at_most_niter – maximum number of iterations to take (Default value = -1).

  • funcname – param first_iter: (Default value = 0).

  • last_iter – Default value = 0).

  • b0_mat – Default value = None).

  • func_index – Default value = None).

  • first_iter – (Default value = 0).

compute_expected_value(expect, cov)[source]

computes 1/2*E(e.T B e) , where e is a vector of expected values expect and covariance matrix cov

Parameters
  • expect – the expected value of inputs.

  • cov – the covariance matrix of inputs.

compute_function_approximation(x_vars)[source]

Computes a second order approximation of the function

Parameters
  • x – the point on which the approximation is evaluated.

  • x_vars – x vars.

compute_gradient_approximation(x_vars)[source]
Computes a first order approximation of the gradient

based on the hessian

Parameters

x_vars – the point on which the approximation is evaluated.

compute_variance(expect, cov)[source]

computes 1/2*E(e.T B e), where e is a vector of expected values expect and covariance matrix cov

Parameters
  • expect – the expected value of inputs.

  • cov – the covariance matrix of inputs.

montecarlo_average_var(mean, cov, n_samples=100000, func=None)[source]

Computes the variance and expected value using Monte Carlo approach

Parameters
  • mean – the mean value.

  • cov – the covariance matrix.

  • n_samples – the number of samples for the distribution (Default value = 100000).

  • func – if None, the compute_function_approximation function, otherwise a user function (Default value = None).