pystra.reliability.sensitivity.SensitivityAnalysis#

Use it: User guide · Worked example · Theory

class SensitivityAnalysis(model, limit_state, *, options=None, method='numerical', delta=0.01, on_failure='raise')[source]#

Bases: object

Sensitivity analysis for the FORM reliability index.

Computes \(\partial\beta / \partial\theta\) for each distribution parameter \(\theta\) declared by Distribution.sensitivity_params (by default, mean and standard deviation; subclasses may add shape parameters, etc.).

Two algorithms are available, selected by method:

  • "numerical" — forward finite differences (default).

  • "closed_form" — closed-form post-processing of a single FORM run using the approach of Bourinet (2017) [Bourinet2017]. This also returns sensitivities to correlation coefficients.

Parameters:
  • model (StochasticModel) – The stochastic model (distributions + correlation).

  • limit_state (LimitState) – The limit state function definition.

  • options (FORMOptions | None) – Settings for every FORM run.

  • method (Literal['numerical', 'closed_form']) – Forward finite differences, in which each parameter is perturbed by delta times its standard deviation and FORM is rerun, or the closed form, which post-processes one FORM run.

  • delta (float) – Relative perturbation of the numerical method; the closed form does not use it.

  • on_failure (Literal['raise', 'return']) – If a FORM analysis does not converge, raise AnalysisError, which carries the unconverged record in .result, or return that record.

Methods

run

Run the sensitivity analysis.

run()[source]#

Run the sensitivity analysis.

Returns:

marginal maps each variable name to the derivatives with respect to its distribution parameters, keyed by the names in its sensitivity_params (typically "mean" and "std", and possibly "shape"). The closed form also gives correlation, a symmetric n × n array whose element (i, j) is \(\partial\beta / \partial\rho_{ij}\), with a zero diagonal.

Return type:

SensitivityResult