Skip to main content

Module uncertainty_quantification

Module uncertainty_quantification 

Source
Expand description

Uncertainty Quantification (UQ) methods for physics simulation.

Provides:

  • Monte Carlo uncertainty propagation
  • Latin hypercube sampling (LHS)
  • Sensitivity analysis (Sobol indices, Morris method)
  • Polynomial chaos expansion (PCE)
  • Stochastic collocation
  • Gaussian process regression for UQ
  • Reliability analysis (FORM / SORM)
  • Bootstrap confidence intervals
  • Bayesian inference via Metropolis-Hastings MCMC
  • Probability of failure estimation

Structs§

CollocationNode
A collocation node (quadrature point + weight) for one dimension.
FormResult
Result of a FORM reliability analysis.
GaussianProcessSurrogate
A fitted Gaussian Process regression model.
LatinHypercubeSample
A Latin Hypercube Sample: rows = samples, columns = dimensions.
McUqResult
Results from a Monte Carlo uncertainty propagation run.
MhConfig
Configuration for the Metropolis-Hastings sampler.
MhResult
Result of Metropolis-Hastings sampling.
MorrisResult
Result of a Morris (elementary effects) sensitivity screening.
PolynomialChaosExpansion
Polynomial Chaos Expansion surrogate model.
SobolIndices
First-order and total-order Sobol sensitivity indices.
UncertainParameter
Description of a single uncertain input parameter.

Functions§

bootstrap_ci
Bootstrap percentile confidence interval for a statistic.
coefficient_of_variation
Coefficient of variation CoV = σ / |μ|.
delta_sensitivity
Estimate the moment-independent delta sensitivity index for dimension dim.
erf
Error function (Horner’s method approximation).
excess_kurtosis
Excess kurtosis = E[(X−μ)⁴] / σ⁴ − 3.
fit_gp
Fit a Gaussian Process surrogate using exact GP regression.
fit_pce
Fit a PCE by non-intrusive (regression) approach using LHS-sampled training data.
form_analysis
First-Order Reliability Method (FORM) via Hasofer-Lind iteration.
gauss_hermite_nodes
Gauss-Hermite quadrature nodes and weights for n-point rule.
hermite_poly
Computes the n-th Hermite polynomial He_n(x) (probabilists’ convention).
importance_sampling_pf
Importance sampling estimate of P_f with a shifted Gaussian importance density.
latin_hypercube_sample
Generate a Latin Hypercube Sample with n_samples points in n_dims dimensions.
mean
Compute the mean of a slice of values.
metropolis_hastings
Metropolis-Hastings MCMC sampler.
monte_carlo_propagation
Run Monte Carlo uncertainty propagation.
morris_sensitivity
Run the Morris method (elementary effects) for n_dims inputs.
normal_cdf
Standard normal CDF (error function approximation).
pce_multi_indices
Generate all multi-indices of total degree ≤ max_degree for n_dims dimensions.
percentile
Sort a slice in-place and return the p-th percentile (linear interpolation).
probability_box
Compute a P-box (probability box) from a set of CDFs.
probability_of_failure_mc
Estimate the probability of failure P_f = P(g(X) ≤ 0) via crude Monte Carlo.
probit
Inverse CDF of the standard normal (rational approximation).
rbf_kernel
Squared-exponential (RBF) kernel: k(x, x’) = σ² exp(-‖x−x’‖² / (2ℓ²)).
reliability_index
Compute the reliability index β from a probability of failure estimate.
scale_lhs
Scale LHS samples from [0,1] to [low, high] for each dimension.
skewness
Skewness of a dataset = E[(X−μ)³] / σ³.
sobol_indices
Estimate Sobol sensitivity indices using the Saltelli (2010) estimator.
sorm_breitung
Second-Order Reliability Method (SORM) correction factor.
std_dev
Compute the standard deviation (population) of a slice.
stochastic_collocation
Compute mean and variance of a model via tensor-product stochastic collocation.
variance
Compute the variance (population) of a slice.