UQ[PY]LAB USER MANUAL
ACTIVE LEARNING RELIABILITY
M. Moustapha, S. Marelli, B. Sudret
CHAIR OF RISK, SAFETY AND UNCERTAINTY QUANTIFICATION
STEFANO-FRANSCINI-PLATZ 5
CH-8093 Z
¨
URICH
Risk, Safety &
Uncertainty Quantification
How to cite UQ[PY]LAB
C. Lataniotis, S. Marelli, B. Sudret, Uncertainty Quantification in the cloud with UQCloud, Proceedings of the 4th
International Conference on Uncertainty Quantification in Computational Sciences and Engineering (UNCECOMP
2021), Athens, Greece, June 27–30, 2021.
How to cite this manual
M. Moustapha, S. Marelli, B. Sudret, UQ[py]Lab user manual Active learning reliability, Report UQ[py]Lab
-V1.0-117, Chair of Risk, Safety and Uncertainty Quantification, ETH Zurich, Switzerland, 2024
BIBT
E
X entry
@TechReport{UQdoc_10_117,
author = {Moustapha, M. and Marelli, S. and Sudret, B.},
title = {{UQ[py]Lab user manual -- Active learning reliability }},
institution = {Chair of Risk, Safety and Uncertainty Quantification, ETH Zurich,
Switzerland},
year = {2024},
note = {Report UQ[py]Lab - V1.0-117}
}
List of contributors:
Name Contribution
A. Hlobilov
´
a Translation from the UQLab manual
Document Data Sheet
Document Ref. UQ[PY]LAB-V1.0-117
Title: UQ[PY]LAB user manual – Active learning reliability
Authors: M. Moustapha, S. Marelli, B. Sudret
Chair of Risk, Safety and Uncertainty Quantification, ETH Zurich,
Switzerland
Date: 27/05/2024
Doc. Version Date Comments
V0.9 24/02/2023 Initial release
V1.0 27/05/2024 Minor update for UQ[PY]LAB release 1.0
Abstract
Structural reliability methods aim at the assessment of the probability of failure of com-
plex systems due to uncertainties associated to their design, manifacturing, environmental
and operating conditions. The name structural reliability comes from the emergence of such
computational methods back in the mid 70’s to evaluate the reliability of civil engineering
structures. As these probabilities are usually small (e.g. 10
2
10
8
), this type of problems
is also known as rare events estimation in the recent statistics literature. A variety of meth-
ods have been developed to estimate the reliability of structures. However they are often
time-consuming as they require repeated evaluations of the computational model describing
the behavior of the system. Alternative and more affordable methods have been developed
thanks to the introduction of surrogate models as cheap proxies of the computational model.
This manual presents the UQ[PY]LAB framework for active learning, a process by which the
surrogate models are sequentially enriched so as to accurately estimate the failure probability
with the smallest possible computational cost. The framework is made of four different
components (namely surrogate model, estimation method, learning function and stopping
criterion) which can be combined to build custom active learning schemes.
The active learning reliability user manual is divided in three parts:
A short introduction to the main concepts and techniques used to solve structural re-
liability problems using active learning, with a selection of references to the relevant
literature
A detailed example-based guide, with the explanation of most of the available options
and methods
A comprehensive reference list detailing all the available functionalities in the UQ[PY]LAB
active learning reliability module.
Keywords: Active Learning, Structural Reliability, Surrogate models, Importance Sampling,
Monte Carlo Simulation, Subset Simulation, AK-MCS, UQ[PY]LAB, rare event estimation.
Contents
1 Theory 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Problem statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.1 Limit-state function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.2 Failure Probability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Strategies for the estimation of P
f
. . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Surrogate-model-based strategies . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4.1 Global framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4.2 Surrogate modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4.3 Reliability analysis algorithm . . . . . . . . . . . . . . . . . . . . . . . 6
1.4.4 Learning function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4.5 Convergence criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Multiple-point enrichment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2 Usage 11
2.1 Reference problem: R-S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2 Problem set-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 Basic active learning reliability . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4 Accessing the results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.5 Advanced usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.5.1 Individually configure each component . . . . . . . . . . . . . . . . . . 15
2.5.2 Other general options . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.5.3 Asynchronous learning . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.6 Advanced limit-state function options . . . . . . . . . . . . . . . . . . . . . . . 18
2.6.1 Specify failure threshold and failure criterion . . . . . . . . . . . . . . 18
2.6.2 Vector Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.7 Excluding parameters from the analysis . . . . . . . . . . . . . . . . . . . . . 19
3 Reference List 21
3.1 Create a reliability analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2 Accessing the results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.3 Printing/Visualizing of the results . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3.1 Printing the results: uq.print . . . . . . . . . . . . . . . . . . . . . . . 32
3.3.2 Graphically display the results: uq.display . . . . . . . . . . . . . . . . 33
Chapter 1
Theory
1.1 Introduction
An engineering system is defined as a system required to provide specific functionality under
well-defined safety constraints. Such constraints need to be taken into account during its
design phase in view of the expected environmental/operating loads it will be subject to.
In the presence of uncertainties in the physical properties of the system (e.g. due to tolerances
in the manufacturing), in the environmental loads (e.g. due to weather conditions), or in the
operating conditions (e.g. traffic), it can occur that the system operates outside of its nominal
range. In such cases, it can encounter failure.
Reliability analysis deals with the quantitative assessment of the probability of occurrence of
such failures (a.k.a. probability of failure), given a probabilistic model of the uncertainty in
the structural, environmental and load parameters.
The UQ[PY]LAB reliability module offers a wide range of state-of-the-art techniques for the
solution of structural reliability problems, summarized in detail in the UQ[PY]LAB User Man-
ual Structural Reliability. Consistently with the overall design philosophy of UQ[PY]LAB,
all these algorithms follow a black-box approach, i.e. they rely on the point-by-point evalua-
tion of a computational model, without knowledge about its inner structure. In some cases,
e.g. for Monte-Carlo based methods, the associated computational cost can be extremely
high when the limit-state function is expensive-to-evaluate (see Section 1.2.1 for proper def-
initions). This document focuses on a specific class of methods, namely active learning-based
reliability methods, whose aim is to reduce the overall computational costs of the analysis
through the use of surrogate models. This is achieved by iteratively building locally accurate
surrogates of the limit state function, which will then serve as a tool to explore the random
variable space.
In this chapter, we first briefly recall the formalism introduced in UQ[PY]LAB User Manual –
Structural Reliability, based on Sudret (2007). We then introduce a modular framework for
active learning reliability, that allows one to easily reproduce a wide array of methods that
have recently been proposed in the reliability analysis literature. This framework is made
of independent blocks, which are themselves based on existing UQ[PY]LAB modules. The
latter are interconnected non-intrusively to build custom solution strategies.
1
UQ[PY]LAB user manual
Figure 1: Schematic representation of the safe and failure domains D
s
and D
f
and the cor-
responding limit-state surface g(x) = 0.
1.2 Problem statement
1.2.1 Limit-state function
A limit state can be defined as a state beyond which a system no longer satisfies some perfor-
mance measure (ISO Norm 2394). Regardless of the choice of the specific criterion, a state
beyond the limit state is classified as a failure of the system.
Consider a system whose state is represented by a random vector of variables X D
X
R
M
.
One can define two domains D
s
, D
f
D
X
that correspond to the safe and failure regions of
the state space D
X
, respectively. In other words, the system is failing if the current state
x D
f
and it is operating safely if x D
s
. This classification makes it possible to construct
a limit-state function g(X ) (sometimes also referred to as performance function) that assumes
positive values in the safe domain and negative values in the failure domain:
x D
s
g(x) > 0
x D
f
g(x) 0
(1.1)
The hypersurface in M dimensions defined by g(x) = 0 is known as the limit-state surface,
and it represents the boundary between safe and failure domains. A graphical representation
of D
s
, D
f
and the corresponding limit-state surface g(x) = 0 is given in Figure 1.
1.2.2 Failure Probability
If the random vector of state variables X is described by a joint probability density function
(PDF) X f
X
(x), then one can define the failure probability P
f
as:
P
f
= P (g(X) 0) . (1.2)
UQ[PY]LAB-V1.0-117 - 2 -
Active learning reliability
This is the probability that the system is in a failed state given the uncertainties of the state
parameters. The failure probability P
f
is then calculated as follows:
P
f
=
Z
D
f
f
X
(x)dx =
Z
{x: g(x)0}
f
X
(x)dx. (1.3)
Note that the integration domain in Eq. (1.3) is only implicitly defined by Eq. (1.1), hence
making its direct estimation practically impossible in the general case. This limitation can be
circumvented by introducing the indicator function of the failure domain, a simple classifier
given by:
1
D
f
(x) =
(
1 if g(x) 0
0 if g(x) > 0
, x D
X
.
In other words, 1
D
f
(x) = 1 when the input parameters x cause the system to fail and
1
D
f
(x) = 0 otherwise. This function allows one to cast Eq. (1.3) as follows:
P
f
=
Z
D
X
1
D
f
(x)f
X
(x)dx = E
1
D
f
(X)
, (1.4)
where E [·] is the expectation operator with respect to the PDF f
X
(x). This reduces the
calculation of P
f
to the estimation of the expectation value of 1
D
f
(X).
1.3 Strategies for the estimation of P
f
From the definition of 1
D
f
(x) in Section 1.2.2 it is clear that determining whether a certain
state vector x D
X
belongs to D
s
or D
f
requires the evaluation of the limit-state function
g(x). In the general case this operation can be computationally expensive, e.g. when it
entails the evaluation of a computational model on the vector x. For a detailed overview
of standard structural reliability methods and applications, see e.g. Ditlevsen and Madsen
(1996); Melchers (1999); Lemaire (2009).
In the following, three strategies are discussed for the evaluation of P
f
, namely approxima-
tion, simulation and adaptive surrogate-modelling-based methods.
Approximation methods
Approximation methods are based on approximating the limit-state function locally at a
reference point (e.g. with a linear or quadratic Taylor expansion). This class of methods
can be very efficient (in that only a relatively small number of model evaluations is needed
to calculate P
f
), but it tends to become unreliable in the presence of complex, non-linear
limit-state functions. Two approximation methods are currently available in UQ[PY]LAB:
FORM (First Order Reliability Method) it is based on the combination of an iterative
gradient-based search of the so-called design point and a local linear approximation of
the limit-state function in a suitably transformed probabilistic space.
SORM (Second Order Reliability Method) it is a second-order refinement of the solution
UQ[PY]LAB-V1.0-117 - 3 -
UQ[PY]LAB user manual
of FORM. The computational costs associated to this refinement increase rapidly with
the number of input random variables M.
Simulation methods
Simulation methods are based on sampling the joint distribution of the state variables in
X and using sample-based estimates of the integral in Eq. (1.4). At the cost of being com-
putationally very expensive, they generally have a well-characterized convergence behaviour
that can be exploited to calculate confidence bounds on the resulting P
f
estimates. Three
sampling-based algorithms are available in UQ[PY]LAB:
Monte Carlo simulation – it is based on the direct sample-based estimation of the expec-
tation value in Eq. (1.4). The total costs increase very rapidly with decreasing values
of the probability P
f
to be computed.
Importance Sampling it is based on improving the efficiency of Monte Carlo simulation
by changing the sampling density so as to favour points in the failure domain D
f
. The
choice of the importance sampling (a.k.a. instrumental) density generally uses FORM
results.
Subset Simulation it is based on iteratively solving and combining a sequence of condi-
tional reliability analyses by means of Markov Chain Monte Carlo (MCMC) simulation.
Surrogate model-based adaptive methods
Surrogate model-based adaptive methods rely on iteratively building models that approxi-
mate the limit-state function in the direct vicinity of the limit-state surface. These surrogates
are adaptively refined by adding limit-state function evaluations to their experimental de-
signs until a suitable convergence criterion related to the accuracy of P
f
is satisfied. This
manual specializes in such approaches. They are thus described in details in the remainder
of this chapter.
Note: This user manual focuses only on surrogate model-based adaptive methods. For
more details on the other two classes of methods, please refer to the UQ[PY]LAB
User Manual – Structural Reliability
1.4 Surrogate-model-based strategies
1.4.1 Global framework
This module is based on the global framework for active learning reliability presented in
Moustapha et al. (2021). The framework aims at building a variety of active learning schemes
by non-intrusively combining methods from four different core components. These compo-
nents, illustrated by a few examples, are presented in Figure 2. The first two modules,
i.e. surrogate modelling and reliability method capitalize on readily available tools within
UQ[PY]LAB-V1.0-117 - 4 -
Active learning reliability
Surrogate model
Kriging
PC-Kriging
PCE
SVR
LRA
...
Reliability method
Monte Carlo
Subset simulation
Importance sampling
...
Learning function
U
EFF
FBR
CMM
...
Stopping criterion
LF-based
Stability of β
Stability of P
f
Bounds on β
Bounds on P
f
...
Figure 2: Active learning reliability framework with methods available in UQ[PY]LAB.
UQ[PY]LAB. They will be briefly described in the next section and the user is referred to the
corresponding manual for a more detailed description. The other two, i.e. learning function
and convergence criteria will be detailed in this manual instead.
Using these four components, an algorithm for active learning reliability can be devised and
summarized as follows:
1. INITIALIZATION: Generate a small initial experimental design X =
x
(1)
, . . . , x
(N
0
)
and evaluate the corresponding limit-state function responses Y =
y
(1)
, . . . , y
(N
0
)
=
g(x
(1)
), . . . , g(x
(N
0
)
)
;
2. SURROGATE MODEL: Train a surrogate model bg (column 1 of Figure 2) on the current
experimental design {X , Y};
3. RELIABILITY METHOD: Using the chosen reliability method (column 2 of Figure 2),
estimate a failure probability
b
P
f
with the current surrogate model;
4. LEARNING FUNCTION: based on an appropriate learning function (column 3 of Fig-
ure 2), choose the best next sample(s) x
next
to be added to the current experimental
design X ;
5. STOPPING CRITERION: check whether a chosen stopping criterion (column 4 of Fig-
ure 2) is met. If it is, skip to Step 7, otherwise continue with Step 6;
6. ENRICHMENT: add x
next
and the corresponding limit-state function response(s) y
next
=
g(x
next
) to the experimental design of the surrogate model. Return to Step 2;
7. CONCLUSION: Return the estimated failure probability
b
P
f
.
1.4.2 Surrogate modelling
Surrogate models are used in active learning reliability as a tool to explore the random space
in a much affordable cost. They are built adaptively in an attempt to finely approximate the
limit-state surface in areas of high probability mass.
There are various surrogate modelling approaches currently offered by UQ[PY]LAB. The
following will be used within the active learning reliability framework:
UQ[PY]LAB-V1.0-117 - 5 -
UQ[PY]LAB user manual
Gaussian process a.k.a. Kriging (UQ[PY]LAB User Manual – Kriging (Gaussian process
modelling));
Polynomial chaos expansions (UQ[PY]LAB User Manual Polynomial Chaos Expan-
sions);
Polynomial chaos-Kriging (UQ[PY]LAB User Manual – PC-Kriging);
Canonical low-rank tensor approximations (UQLAB User Manual – Canonical low-rank
approximations);
Support vector machines for regression (UQLAB User Manual Support vector ma-
chines regression).
The user is referred to the respective manuals for more details about each of the surrogate
models. Throughout this document, they will be treated as black-boxes, i.e. we will only
be interested in their input-output structures. More specifically, for a given random variable
x, we denote by bg (x) the corresponding surrogate model prediction. Note that in some
cases, such as Kriging and polynomial chaos-Kriging, a second output, namely the prediction
variance, is also available. This can be quite useful in active learning and will be denoted by
bs
2
(x).
1.4.3 Reliability analysis algorithm
Reliability algorithms lie at the core of active learning methods, as they are primarily used
to estimate the failure probability. As explained in previous sections, simulation methods
are preferred to approximation ones as they often lead to more accurate results. This comes
however at the expense of generally increased computational costs. When used in conjunc-
tion with surrogate-based methods, however, they can be effectively exploited, due to the
extreme efficiency of surrogate model predictors, which are typically inexpensive to evaluate
(often O(10
56
s
1
)).
This module is also considered black-box and directly calls the following methods from the
UQ[PY]LAB reliability module:
Monte Carlo simulation, UQ[PY]LAB User Manual – Structural Reliability, Section ??
Importance sampling, UQ[PY]LAB User Manual – Structural Reliability, Section ??
Subset simulation, UQ[PY]LAB User Manual – Structural Reliability, Section ??
1.4.4 Learning function
A learning function is used to identify the points that, once added to the experimental de-
sign, would best reduce the surrogate-induced error in the estimated failure probability. The
candidate point is normally chosen from a suitably defined candidate set S, often a large
UQ[PY]LAB-V1.0-117 - 6 -
Active learning reliability
Monte-Carlo sampling of the input space, or, in this framework, the full set of limit state eval-
uations performed by the reliability algorithm of choice at the current algorithm iteration. A
wide variety of learning functions have been proposed in the recent literature.
In the current version, UQ[PY]LAB offers the following four:
Deviation number
Also known as U learning function, the deviation number was developed by Echard et al.
(2011) based on the concept of misclassification probability, and reads:
U(x) =
|bg(x)|
bs(x)
. (1.5)
This quantity is directly related to the probability of misclassification in case of Gaussian
distributed variables (as is the case in Kriging-based predictors) as:
P
m
(x) = Φ (U (x)) , (1.6)
where Φ is the standard Gaussian CDF.
The next sample candidate is chosen as the one from the candidate pool S that maximizes
the probability of misclassficiation or equivalently minimizes U:
x
next
= arg min
s∈S
U (s) = arg max
s∈S
P
m
(s) . (1.7)
Efficient feasibility function
Another popular learning function was introduced by Bichon et al. (2008) and reads:
EF F (x) = bg(x)
bg(x)
bs(x)
Φ
ϵ bg(x)
bs(x)
Φ
ϵ bg(x)
bs(x)

bs(x)
2φ
bg(x)
bs(x)
φ
ϵ bg(x)
bs(x)
φ
ϵ bg(x)
bs(x)

+ ϵ
Φ
ϵ bg(x)
bs(x)
Φ
ϵ bg(x)
bs(x)

, (1.8)
where ϵ = 2bs(x) and φ is the PDF value of a standard normal Gaussian variable. The EFF
function provides an indication of how well the true model response is expected to satisfy
g(x) = 0 and provides a good exploration/exploitation balance for enrichment. It takes large
values when a point is close to the limit-state threshold, i.e. bg(x) 0 and/or when there
is large uncertainty in the prediction, i.e. bs(x) is large. The next candidate sample is then
chosen as follows:
x
next
= arg max
s∈S
EF F (s) . (1.9)
Fraction of bootstrap replicates
This learning function, introduced in Marelli and Sudret (2018), uses B bootstrap repli-
cates of the experimental design to build multiple surrogates and then eventually assess their
UQ[PY]LAB-V1.0-117 - 7 -
UQ[PY]LAB user manual
consistency in predicting the failed/safe state of a candidate sample. Because it is a direct
measure of the misclassification probability of the current surrogate, it is closely related to
the deviation number introduced earlier, but it does not require the predictions to be normally
distributed.
It is defined as:
U
FBR
(x) =
|B
s
(x) B
f
(x)|
B
, (1.10)
where B
s
(x) and B
f
(x) [0, . . . , B] are respectively the number of safe and failed boot-
strap replicate predictions at the point x. Samples whose prediction is uncertain tend to have
close values of B
s
and B
f
, hence the next sample is chosen as:
x
next
= arg min
s∈S
U
FBR
(s) . (1.11)
Constrained min-max
This learning function was introduced in Moustapha and Sudret (2019) as an adaptation
of Basudhar and Missoum (2008). It aims at finding in the vicinity of the limit-state approx-
imation samples that are the furthest from existing training points. The next sample to add
then reads:
x
next
= max
s∈S
min
i=1,...,N
s x
(i)
, (1.12)
where S
= {s S : |bg (s)| q} with q being an γ-quantile of |bg (s)|. The default value
γ = 0.01 is used in UQ[PY]LAB.
1.4.5 Convergence criterion
Various convergence criteria can be used to terminate the enrichment process. The stopping
criteria implemented in UQ[PY]LAB can be split into three categories:
Variance-based criteria
These criteria relate to the surrogate-induced uncertainty in the estimates of the failure
probability or in the associated reliability index
b
β. This uncertainty is estimated through the
built-in error measure provided by some surrogates. As such, they apply only to Kriging and
PC-Kriging.
The first criterion is based on bounds of the estimated failure probability and is computed as
follows:
b
P
+
f
b
P
f
b
P
0
f
ϵ
bound
b
P
f
, (1.13)
where the three failure probabilities are defined as:
b
P
0
f
= P (bg(x) 0) , (1.14)
b
P
±
f
= P (bg(x) kbs(x) 0) , (1.15)
where k = Φ
1
(1 α/2) sets the confidence level (1 α), typically k = Φ
1
(97.5%) = 1.96.
UQ[PY]LAB-V1.0-117 - 8 -
Active learning reliability
The second criterion is similarly defined, however using the reliability index instead:
b
β
+
b
β
b
β
0
ϵ
bound
b
β
, (1.16)
where the three reliability indices correspond to the aforementioned failure probabilities:
b
β
0
= Φ
1
(
b
P
0
f
), (1.17)
b
β
±
= Φ
1
(
b
P
f
). (1.18)
Stability based criteria
The second family of convergence criteria applies to all surrogate types and relates to the
stability of the failure probability or reliability index estimates. They respectively read:
b
P
(j)
f
b
P
(j1)
f
b
P
(j)
f
ϵ
stab
b
P
f
(1.19)
and
b
β
(j)
b
β
(j1)
b
β
(j)
ϵ
stab
b
β
(1.20)
where
b
P
(j)
f
and
b
β
(j)
respectively represent the estimated failure probability and reliability
index at the j-th iteration.
Learning function-based criteria
The final category of convergence criteria are directly based on the learning functions.
For the deviation number, the criterion reads:
min
s∈S
U (s) > ϵ
U
. (1.21)
This is the original AK-MCS stopping criterion and basically means that the probability of
misclassifying any point in the candidate pool is smaller than Φ (ϵ
U
).
In a similar fashion, the original EFF stopping criterion is implemented and reads:
max
s∈S
EF F (s) < ϵ
EFF
. (1.22)
For the fraction of bootstrap replicates, the stopping criterion reads:
min
s∈S
U
FBR
(s) < ϵ
FBR
. (1.23)
Finally, for the min-max criterion, the stopping criterion refers to the minimal distance to the
other experimental design points
max
s∈S
min
i=1,...,N
s x
(i)
10
2
· d
0
(1.24)
UQ[PY]LAB-V1.0-117 - 9 -
UQ[PY]LAB user manual
where d
0
is the minimum distance between the experimental design points at the first itera-
tion.
1.5 Multiple-point enrichment
It is possible to add K > 1 samples within a single enrichment iteration. This is achieved in
UQ[PY]LAB using weighed K-means clustering (Zaki and Meira, 2014). First, a subset of the
candidate pool S is defined according to the learning function:
For U and EF F , the subset is defined as the following margin of uncertainty:
S
′′
= {x S : 2 bs (x) bg (x ) 2 bs (x)} (1.25)
For the fraction of bootstrap replicates, the subset is defined as:
S
′′
= {x S : U
FBR
(x) < 0.5} (1.26)
The set S
′′
is then reduced into K cluster centers obtained by weighted K-means clustering
using weights defined according to the learning function. They read as follows:
Deviation number
w (x) = φ (U (x)) ; (1.27)
Expected feasibility
w (x) = φ (EF F (x)) ; (1.28)
Fraction of bootstrap replicates
w (x) = φ (U
FBR
(x)) ; (1.29)
where φ is the standard Gaussian PDF.
For the constrained min-max criterion, the enrichment is made sequentially one sample at a
time, with the min-max distance updated after the addition of each sample.
UQ[PY]LAB-V1.0-117 - 10 -
Chapter 2
Usage
In this section, a reference problem will be set up to showcase how each of the techniques in
Chapter 1 can be deployed in UQ[PY]LAB.
2.1 Reference problem: R-S
The benchmark of choice to showcase the methods described in Section 1.3 is a basic problem
in structural reliability, namely the R-S case. It is one of the simplest possible abstract setting
consisting of only two input state variables: a resistance R and a stress S. The system fails
when the stress is higher than the resistance, leading to the following limit-state function:
X = {R, S} g(X) = R S; (2.1)
The two-dimensional probabilistic input model consists of independent variables distributed
according to Table 1.
Table 1: Distributions of the input parameters of the R S model in Eq. (2.1).
Name Distributions Parameters Description
R Gaussian [5, 0.8] Resistance of the system
S Gaussian [2, 0.6] Stress applied to the system
2.2 Problem set-up
Solving a structural reliability problem in UQ[PY]LAB requires the definition of three basic
components:
a MODEL object that describes the limit-state function
an INPUT object that describes the probabilistic model of the random vector X
a reliability ANALYSIS object.
The UQ[PY]LAB framework is first initialized with the following command:
11
UQ[PY]LAB user manual
from uqpylab import sessions
# Start the session
mySession = sessions.cloud()
# (Optional) Get a convenient handle to the command line interface
uq = mySession.cli
# Reset the session
mySession.reset()
The model in Eq. (2.1) can be added as a MODEL object directly with a MATLAB vectorized
string as follows:
MOpts = {
'Type': 'Model',
'mString': 'X(:,1) - X(:,2)',
'isVectorized': 1
}
myModel = uq.createModel(MOpts)
For more details on the available options to create a model object in UQ[PY]LAB, please
refer to the UQ[PY]LAB User Manual – the MODEL module.
Correspondingly, an INPUT object with independent Gaussian variables as specified in Table 1
can be created as:
IOpts = {
'Marginals': [
{
'Name': 'R', # Resistance
'Type': 'Gaussian',
'Moments': [5.0 , 0.8]
},
{
'Name': 'S', # Stress
'Type': 'Gaussian',
'Parameters': [2.0 , 0.6]
}
]
}
myInput = uq.createInput(IOpts)
For more details about the configuration options available for an INPUT object, please refer
to the UQ[PY]LAB User Manual – the INPUT module.
2.3 Basic active learning reliability
Running an active learning reliability analysis on the specified UQ[PY]LAB MODEL and IN-
PUT objects does not require any specific configuration. The following minimum syntax is
required:
ALROpts = {
'Type': 'Reliability',
'Method': 'ALR'
}
UQ[PY]LAB-V1.0-117 - 12 -
Active learning reliability
ALRAnalysis = uq.createAnalysis(ALROpts)
Once the analysis is performed, a report with the ALR results can be printed on screen by:
uq.print(ALRAnalysis)
which produces the following:
---------------------------------------------------
Active learning reliability
---------------------------------------------------
Pf 1.4002e-03
Beta 2.9888
CoV 0.0189
ModelEvaluations 11
PfCI [1.3484e-03 1.4520e-03]
BetaCI [2.9777e+00 3.0003e+00]
PfMinus/Plus [1.4002e-03 1.4002e-03]
---------------------------------------------------
The results can be visualized graphically as follows:
uq.display(ALRAnalysis)
which produces the images in Figure 3. Note that the graphical representation of the experi-
mental design (right panel of Figure 3) is only produced for the 2-dimensional case.
Figure 3: Graphical visualization of the results of the basic ALR analysis Section 1.4.
UQ[PY]LAB-V1.0-117 - 13 -
UQ[PY]LAB user manual
Note: In the preceding example, no specifications are provided. If not further specified,
the ALR runs the following defaults:
Surrogate model: PC-Kriging;
Reliability algorithm: Subset simulation;
Learning function : Deviation number (U-function);
Stopping criterion: Bounds on the β estimate.
These defaults were chosen following an extensive benchmark carried out in
Moustapha et al. (2021).
2.4 Accessing the results
The results from the active learning reliability analysis are stored in the ALRAnalysis['Results']
dictionary:
{
'Pf': 0.001401,
'CoV': 0.018877,
'Beta': 2.988849,
'ModelEvaluations': 11,
'PfCI': [0.001348, 0.001452],
'BetaCI': [2.977731, 3.000350],
'Metamodel': 'Model 2',
'Reliability': 'Analysis 1',
'History': {...}
}
The Results dictionary contains the following keys: Pf, the estimated
b
P
f
; Beta, the corre-
sponding generalized reliability index; CoV, the calculated coefficient of variation;
ModelEvaluations, the total number of limit-state function evaluations; PfCI, the confi-
dence intervals; BetaCI, the corresponding confidence intervals on β
HL
; History, a dictio-
nary containing the convergence of P
f
, CoV , the stopping criteria values, upper and lower
bounds on the failure probability (when this applies). The content of the History dictionary
is used to produce the convergence plot shown in Figure 3. Note that the actual calculation of
each of these results is dependent on the reliability algorithm used. The user should refer to
the corresponding sections in the UQ[PY]LAB User Manual – Structural Reliability for further
details.
Further, the key Metamodel contains a string with a UQ[PY]LAB name of the metamodel.
To retrieve the metamodel, one can write:
parentName = ALRAnalysis['Name']
objPath = 'Results.Metamodel'
myModel = uq.extractFromAnalysis(parentName=parentName,objPath=objPath)
This metamodel can be reused within UQ[PY]LAB for any other purpose.
UQ[PY]LAB-V1.0-117 - 14 -
Active learning reliability
2.5 Advanced usage
2.5.1 Individually configure each component
In this section, we will discuss how the options for each module of the framework can be set
independently.
2.5.1.1 Surrogate model
The surrogate model can be specified using the following key-value pairs ['ALR']['Metamodel'].
For instance, the user may specify the following command to use Kriging:
ALROpts['ALR'] = {'Metamodel': 'Kriging'}
Furthermore, the user can specify the options of the chosen surrogate by using the following
key-value pairs ['ALR'][MetamodelName], e.g. for Kriging:
KrgOpts = {
'EstimMethod': 'ML',
'Corr': {
'Family': 'Gaussian',
'Nugget': 1e-12
}
}
ALROpts['ALR']['Kriging'] = KrgOpts
Note: When no surrogate model is specified, PC-Kriging is used with the following de-
faults:
PCE degree: adaptively calibrated in the range 1 to 3
Kriging nugget: 10
10
Kriging estimation method: maximum likelihood
The remaining options are the defaults as defined in the UQ[PY]LAB User Manual
– PC-Kriging.
All the options available for each surrogate model can be specified here without restrictions,
except for the experimental design, which is handled by the ALR algorithm.
Table 2: List of supported surrogate models and user manuals
Surrogate Model User Manual
Kriging UQ[PY]LAB User Manual – Kriging (Gaussian process modelling)
PC-Kriging UQ[PY]LAB User Manual – PC-Kriging
PCE UQ[PY]LAB User Manual – Polynomial Chaos Expansions
LRA UQLAB User Manual – Canonical low-rank approximations
SVR UQLAB User Manual – Support vector machines regression
UQ[PY]LAB-V1.0-117 - 15 -
UQ[PY]LAB user manual
2.5.1.2 Reliability algorithm
To specify a reliability algorithm, the user must set the following key-value pairs
['ALR']['Reliability']. For instance, the following code selects subset simulation:
ALROpts['ALR']['Reliability'] = 'Subset'
All the options relative to the reliability algorithm can be set as defined in the UQ[PY]LAB
User Manual – Structural Reliability. For instance, the user can specify the conditional target
failure probability in subset as follows:
ALROpts['Subset'] = {'p0': 0.1}
Similarly, simulation options can be defined as follows:
ALROpts['ALR'] = {
'Simulation': {
'BatchSize': 1e3,
'MaxSampleSize': 1e4
}
}
Note: When no surrogate model is specified, subset simulation is used with the follow-
ing options:
Batch sample size: 10
5
Maximum sample size: 2 · 10
6
Conditional probability: p
0
= 0.15
The remaining options are the defaults as defined in the UQ[PY]LAB User Manual
– Structural Reliability.
2.5.1.3 Learning function
The learning function may be specified using the following key-value pairs
['ALR']['LearningFunction']. For instance, the following line of code specifies the devi-
ation number as learning function:
ALROpts['ALR']['LearningFunction'] = 'U'
It is worth noting that some learning functions are available exclusively for a specific type of
surrogate model. Table 3 shows all the possible combinations.
Note: When not specified by the user, the default learning function depends on the
surrogate model and is chosen as follows:
'U' for PC-Kriging and Kriging;
'FBR' for PCE;
'CMM' for SVR and LRA.
UQ[PY]LAB-V1.0-117 - 16 -
Active learning reliability
Table 3: Available combinations of surrogate models and learning function in UQ[PY]LAB.
U EFF FBR CMM
Kriging
PC-Kriging
PCE
LRA
SVR
2.5.1.4 Stopping criterion
The stopping criterion may be specified by the user using the following key-value pairs
['ALR']['Convergence']. The following line sets the β-bound criterion (See Eq. 1.16)
as stopping criterion:
ALROpts['ALR']['Convergence'] = 'StopBetaBound'
To set the corresponding threshold, say ϵ
bound
b
β
= 0.05, the following command may be used:
ALROpts['ALR']['ConvThres'] = 0.05
2.5.2 Other general options
There are several overarching options that may be needed to configure an ALR analysis.
Some of the most common are summarized below:
Specify the initial experimental design: Apart from specifying a number of points
and a sampling strategy, the initial experimental design can be specified by providing
X =
x
(1)
, . . . , x
(N
0
)
in the matrix X and the corresponding limit-state function values
g(x
(1)
, . . . , x
(N
0
)
in G:
ALROpts['ALR']['IExpDesign'] = {
'X': X,
'G': G
}
Note that matrices X and G must be of type list. The user can use X.tolist() and
G.tolist() to convert the data elements of an array into a proper type.
Specify the maximum number of additional experimental design points: The max-
imum number of samples added to the initial experimental design can be specified to
e.g. 100 as:
ALROpts['ALR']['MaxAddedED'] = 100
Note that the total number of runs of the limit-state function then is at most the initial
ED size plus the above number.
UQ[PY]LAB-V1.0-117 - 17 -
UQ[PY]LAB user manual
Specify multiple enrichment points: An arbitrary K > 1 number of points can be
added simultaneously to the ED at each iteration as described in Section 1.5. For
instance, K = 3 points can be added simultaneously using:
ALROpts['ALR']['NumOfPoints'] = 3
2.5.3 Asynchronous learning
In some contexts, it is desirable to evaluate the limit state function outside the main UQ[PY]LAB
or even Python session. We identify this process as asynchronous learning, because the
learning algorithm and the limit state function evaluations are performed separately, possi-
bly at different locations and times.
The ALR method supports an asynchronous learning feature, which makes it possible to per-
form active-learning-based reliability analysis also without defining a computational model
within UQ[PY]LAB. To enable this feature, the following option is needed:
ALROpts['Async'] ={'Enable': True}
When this option is enabled, instead of evaluating the limit state function, UQ[PY]LAB will
interrupt the execution of the analysis and return the next sample that the user needs to eval-
uate to continue the algorithm. This sample is provided in the key ['Results']['NextSample'].
The user can then evaluate this sample outside of UQ[PY]LAB or Python , and provide the
model evaluations Ynext back to UQ[PY]LAB with the uq.resumeAnalysis command:
myALRAnalysis = uq.resumeAnalysis(Ynext)
Note that Ynext needs to be of type list. The user can use Ynext.tolist() to convert the
data elements of an array into a proper type.
2.6 Advanced limit-state function options
2.6.1 Specify failure threshold and failure criterion
While it is normally good practice to define the limit-state function directly as a UQ[PY]LAB
MODEL object as in Section 2.2, in some cases it can be useful to be able to create one from
small modifications of existing MODEL objects. A typical scenario where this is apparent is
when the same objective function needs to be tested against a set of different failure thresh-
olds, e.g. for a parametric study. In this case, the limit-state specifications can be modified.
As an example, when g(x) T = 5 defines the failure criterion, one can use the following
syntax:
ALROpts['LimitState'] = {
'Threshold': 5,
'CompOp': '<='
}
UQ[PY]LAB-V1.0-117 - 18 -
Active learning reliability
UQ[PY]LAB offers several possibilities to create simple (or arbitrarily complex) objective
functions from existing MODEL objects (see also UQ[PY]LAB User Manual Structural Re-
liability).
For an overview of the advanced options for the limit-state function, refer to Table 5, page
25.
2.6.2 Vector Outputs
In case the limit-state function g(x) results in a vector rather than a scalar value, the struc-
tural reliability module estimates the failure probability for each component independently.
Note: There is no system-type reasoning implemented to combine the failure probabil-
ities of each component.
However, the implemented methods make use of evaluations of the limit-state function if
available, as follows:
at the surrogate level: The initial experimental design for the surrogate model of
output component i consists of the final experimental design of component i 1.
at the reliability level:
Monte Carlo simulation: The enrichment of the sample size is increased until the
convergence criteria are fulfilled for all components.
Subset Simulation: The first batch of samples (MCS) is reused for every output
component of the limit-state.
2.7 Excluding parameters from the analysis
In various usage scenarios (e.g. parametric studies) one or more input variables may be set
to fixed constant values. This can have important consequences for many of the methods
available in UQ[PY]LAB whose costs increase significantly with the number of input vari-
ables. Whenever applicable, UQ[PY]LAB will appropriately account for the set of constant
input parameters and exclude them from the analysis so as to avoid unnecessary costs. This
process is transparent to the user as the analysis results will still show the excluded variables,
but they will not be included in the calculations.
To set a parameter to constant, the following command can be used when the probabilistic
input is defined (See UQ[PY]LAB User Manual – the INPUT module):
IOpts['Marginals'][numberOfVariable]['Type'] = 'Constant'
IOpts['Marginals'][numberOfVariable]['Parameters'] = [value]
Furthermore, when the standard deviation of a parameter equals zero, UQ[PY]LAB treats it
as a Constant. For example, the following uniformly distributed variable whose upper and
lower bounds are identical is automatically set to a constant with value 1:
UQ[PY]LAB-V1.0-117 - 19 -
UQ[PY]LAB user manual
InputOpts['Marginals'][numberOfVariable]['Type'] = 'Uniform'
InputOpts['Marginals'][numberOfVariable]['Parameters'] = [1, 1]
UQ[PY]LAB-V1.0-117 - 20 -
Chapter 3
Reference List
How to read the reference list
Python dictionaries play an important role throughout the UQ[PY]LAB syntax. They offer
a natural way to semantically group configuration options and output quantities. Due to
the complexity of the algorithms implemented, it is not uncommon to employ nested dictio-
naries to fine-tune the inputs and outputs. Throughout this reference guide, a table-based
description of the configuration dictionaries is adopted.
The simplest case is given when a value of a dictionary key is a simple value or a list:
Table X: Input
Name String A description of the field is put here
which corresponds to the following syntax:
Input = {
'Name' : 'My Input'
}
The columns, from left to right, correspond to the name, the data type and a brief description
of each key-value pair. At the beginning of each row a symbol is given to inform as to whether
the corresponding key is mandatory, optional, mutually exclusive, etc. The comprehensive
list of symbols is given in the following table:
Mandatory
Optional
Mandatory, mutually exclusive (only one of
the keys can be set)
Optional, mutually exclusive (one of them
can be set, if at least one of the group is set,
otherwise none is necessary)
21
UQ[PY]LAB user manual
When the value of one of the keys of a dictionary is a dictionary itself, a link to a table that
describes the structure of that nested dictionary is provided, as in the case of the Options
key in the following example:
Table X: Input
Name String Description
Options Table Y Description of the Options
dictionary
Table Y: Input['Options']
Key1 String Description of Key1
Key2 Double Description of Key2
In some cases, an option value gives the possibility to define further options related to that
value. The general syntax would be:
Input = {
'Option1' : 'VALUE1',
'VALUE1' : {
'Val1Opt1' : ... ,
'Val1Opt2' : ...
}
}
This is illustrated as follows:
Table X: Input
Option1 String Short description
'VALUE1' Description of 'VALUE1'
'VALUE2' Description of 'VALUE2'
VALUE1 Table Y Options for 'VALUE1'
VALUE2 Table Z Options for 'VALUE2'
Table Y: Input['VALUE1']
Val1Opt1 String Description
Val1Opt2 Float Description
Table Z: Input['VALUE2']
Val2Opt1 String Description
Val2Opt2 Float Description
UQ[PY]LAB-V1.0-117 - 22 -
Active learning reliability
3.1 Create a reliability analysis
Syntax
myAnalysis = uq.createAnalysis(ALROpts)
Input
All the parameters required to determine the analysis are to be given as keys of the dictio-
nary ALROpts. Each method has its own options, that will be reviewed in different tables.
The options described in Table 4 are common to all methods.
Note: This manual focuses on active learning reliability methods but is generally part
of the UQ[PY]LAB reliability manual. All options to any reliability method can
be defined in the keys of the dictionary ALROpts. However in this manual, only
the options directly related to active learning will be described. For the complete
set of options of the methods available in the UQ[PY]LAB reliability module,
the user is referred to the corresponding manual (UQ[PY]LAB User Manual
Structural Reliability, Section ??).
Table 4: ALROpts
Type 'uq_reliability' Identifier of the module. The options
corresponding to other types are in
the corresponding guides.
Method String Type of structural reliability method.
The available options are listed
below:
'ALR' Active learning reliability.
'MCS' Monte Carlo simulation (without
active learning).
'FORM' First order reliability method
(without active learning).
'SORM' Second order reliability method
(without active learning).
'IS' Importance sampling (without active
learning).
'Subset' Subset simulation (without active
learning).
'AKMCS' Adaptive Kriging Monte Carlo
Simulation (AK-MCS).
Name String Name of the module. If not set by
the user, a unique string is
automatically assigned to it.
UQ[PY]LAB-V1.0-117 - 23 -
UQ[PY]LAB user manual
Input INPUT object INPUT object used in the analysis. If
not specified, the currently selected
one is used.
Model MODEL object MODEL object used in the analysis. If
not specified, the currently selected
one is used.
LimitState See Table 5 Specification of the limit-state
function.
Display String
default: 'standard'
Level of information displayed by the
methods.
'quiet' Minimum display level, displays
nothing or very few information.
'standard' Default display level, shows the most
important information.
'verbose' Maximum display level, shows all the
information on runtime, like updates
on iterations, etc.
ALR See Table 6 Options key for the active learning
reliability scheme.
Simulation See Table 7 Options key for the simulation
methods used within the active
learning scheme.
IS See Table 8 Options key for importance
sampling if used within the active
learning scheme.
Subset See Table 9 Options key for subset simulation if
used within the active learning
scheme.
SaveEvaluations Logical
default: True
Storage or not of performed
evaluations of the limit-state
function.
True Store the evaluations.
False Do not store the evaluations.
Async See Table 12 Options for asynchronous learning.
UQ[PY]LAB-V1.0-117 - 24 -
Active learning reliability
In order to perform a structural reliability analysis, the limit-state function g(x) is compared
to a threshold value T (by default T = 0). In analogy with Eq. (1.1), failure is defined as
g(x) T . Alternatively, failure can be specified as g(x) T by adjustment of the key
ALROpts['LimitState']['CompOp'] to '>='. The relevant options are summarized in
Table 5:
Table 5: ALROpts['LimitState']
Threshold Float
default: 0
Threshold T , compared to the
limit-state function g(x).
CompOp String
default: '<='
Comparison operator for the
limit-state function.
'<', '<=' Failure is defined by g(x) < T .
'>', '>=' Failure is defined by g(x) > T .
The active learning scheme is built by choosing different methods within various modules
of UQ[PY]LAB, as well as some overarching options such as the initial experimental design
specification. In Table 6, the available options are shown:
Table 6: ALROpts['ALR']
Metamodel String
default: 'PCK'
Surrogate model type to use in the
active learning scheme (as described
in Section 1.4.2).
'PCK' Polynomial Chaos - Kriging
'Kriging' Kriging
'PCE' Polynomial chaos expansions
'SVR' Support vector machines for
regression
'LRA' Low rank approximation
Reliability String
default: 'Subset'
Reliability algorithm used in the
active learning scheme (as described
in Section 1.4.3).
'MCS' Monte Carlo simulation
'Subset' Subset simulation
'IS' Importance sampling
UQ[PY]LAB-V1.0-117 - 25 -
UQ[PY]LAB user manual
LearningFunction String or list of strings Learning function used in the active
learning scheme (as described in
Section 1.4.4). The default depends
on the surrogate defined in
['ALR']['Metamodel'] and is
set as:
'U' when using 'PCK' or
'Kriging'
'FBR' when using 'PCE'
'CMM' when using 'SVR' or
'LRA'
'U' Deviation number as defined in
Eq. (1.5)
Only valid when
['ALR']['Metamodel'] is set to
'PCK' or 'Kriging'
'EFF' Expected feasibility function as
defined in Eq. (1.8)
Only valid when
['ALR']['Metamodel'] is set to
'PCK' or 'Kriging'
'FBR' Fraction of bootstrap replicates as
defined in Eq. (1.10)
Only valid when
['ALR']['Metamodel'] is set to
'PCE'
'CMM' Constrained min-max as defined in
Eq. (1.12)
Convergence String
default:
'StopBetaBound'
when
['ALR']['Metamodel']
is 'Kriging' or 'PCK'
and 'StopBetaStab'
otherwise
Convergence criterion used in the
active learning scheme (as described
in Section 1.4.5)
'StopBetaBound' Convergence criterion based on the
accuracy of the reliability index
estimate w.r.t. the surrogate error
(See Eq. (1.16))
Only valid when
['ALR']['Metamodel'] is set to
'PCK' or 'Kriging'
'StopPfBound' Convergence criterion based on the
accuracy of the failure probability
estimate w.r.t. the surrogate error
(See Eq. (1.13))
Only valid when
['ALR']['Metamodel'] is set to
'PCK' or 'Kriging'
UQ[PY]LAB-V1.0-117 - 26 -
Active learning reliability
'StopBetaStab' Convergence criterion based on the
stability of the reliability index
estimate (See Eq. (1.20))
'StopPfStab' Convergence criterion based on the
stability of the failure probability
estimate (See Eq. (1.19))
'StopLF' Convergence criterion based on the
learning function defined in
['ALR']['Learning']
For 'U', see Eq. (1.21)
For 'EFF', see Eq. (1.22)
For 'FBR', see Eq. (1.23)
For 'CMM', see Eq. (1.24)
ConvThres Float Threshold for the convergence
criterion defined in
['ALR']['Convergence'].
Default is:
2 for ϵ
U
in Eq. (1.21)
10
3
for ϵ
EFF
in Eq. (1.22)
10
2
for the remaining stopping
criteria
When multiple convergence criteria
are used, this can be either a scalar
(then the same threshold is used for
all criteria) or a vector of size
1 × N
crit
where N
crit
is the number
of convergence criteria defined.
NumOfPoints Integer
default: 1
Number of points to add within an
enrichment step (See Section 1.5 for
multiple point enrichment).
ConvIter Integer
default: 2
Number of successive iterations the
convergence criteria should be
satisfied for the algoritm to stop.
MaxAddedED Integer
default: 1000
Maximum number of samples to add
to the experimental design of the
metamodel.
IExpDesign See Table 11 Specification of the initial
experimental design of the
metamodel.
The available methods to perform structural reliability analysis within an active learning
scheme are Monte Carlo simulation, importance sampling and subset simulation. They all
share the simulation options which are shown in Table 7:
UQ[PY]LAB-V1.0-117 - 27 -
UQ[PY]LAB user manual
Table 7: ALROpts['Simulation']
Alpha Float
default: 0.05
Confidence level α. For the Monte
Carlo estimators, a confidence
interval is constructed with
confidence level 1 α.
MaxSampleSize Integer
default: 2 · 10
6
for 'SuS';
10
5
for 'IS';
10
7
for 'MCS'
Maximum number of samples to be
evaluated. If there is no target
coefficient of variation (CoV), this is
the total number of samples to be
evaluated. If the target CoV is
present, the method will run until
TargetCoV or MaxSampleSize is
reached. In this case, the default
value of MaxSampleSize, if not
specified in the options, is Inf,
i.e.the method will run until the
target CoV is achieved.
TargetCoV Float Target coefficient of variation. If
present, the method will run until
the estimate of the CoV (UQ[PY]LAB
User Manual – Structural Reliability
Eq. (??)) is below TargetCoV or
until MaxSampleSize function
evaluations are performed. The
value of the coefficient of variation of
the estimator is checked after each
BatchSize evaluations. By default
this option is disabled. Note: this
option has no effect in
Method = 'Subset' and
'AKMCS'.
BatchSize Integer
default: 10
6
for 'MCS';
10
5
for 'Subset';
10
4
for 'IS'
Number of samples that will be
evaluated at once.
The options specifically set for the importance sampling are presented in Table 8. Note that
the options of Simulation and FORM (not shown in this manual) are also processed in the
case of importance sampling due to the nature of the MCS, FORM and IS.
Table 8: ALROpts['IS']
Instrumental 1 × N
out
INPUT object or
dictionary
Instrumental distribution defined as
either a dictionary of input
marginals and copula or an INPUT
object (refer to UQ[PY]LAB User
Manual – the INPUT module for
details).
UQ[PY]LAB-V1.0-117 - 28 -
Active learning reliability
FORM FORM ANALYSIS object FORM results computed previously.
See Section ?? in UQ[PY]LAB User
Manual – Structural Reliability for
details.
The options specifically set for subset simulation are presented in Table 9. Note that the
options of Simulation are also processed in the case of subset simulation due to the similar
nature of Monte Carlo simulation and subset simulation.
Table 9: ALROpts['Subset']
p0 Float
default: 0.15
Target conditional failure probability
of auxiliary limit-states
(0 <p0 0.5).
Proposal See Table 10 Description of the proposal
distribution in the Markov Chain.
MaxSubsets Integer
default:
MaxSampleSize
BatchSize·(1p0)
Maximum number of subsets. In the
subset simulation algorithm, the
maximum number of subsets is set to
the minimum of MaxSubsets and
MaxSampleSize
BatchSize·(1p0)
.
The settings of the Markov Chain Monte Carlo simulation in subset simulation are summa-
rized in Table 10. Note that the default values are taken from Au and Beck (2001).
Table 10: ALROpts['Subset']['Proposal'] (Proposal distributions)
Type String
default: 'Uniform'
Type of proposal distribution (in the
standard normal space).
'Gaussian' Gaussian distribution.
'Uniform' Uniform distribution.
Parameters Float
default: 1
Parameter of the proposal
distribution. Corresponds to the
standard deviation for a Gaussian
distribution and the half-width for
the uniform distribution.
The initial experimental design of surrogate model can either be given by a number of sam-
ples and a sampling method or by a matrix containing the set of input samples and the
corresponding values of the limit-state function.
UQ[PY]LAB-V1.0-117 - 29 -
UQ[PY]LAB user manual
Table 11: ALROpts['ALR']['IExpDesign']
N Integer
default: max(10, 2 × M)
Number of samples in the initial
experimental design.
Sampling String
default: 'LHS'
Sampling techniques of the initial
experimental design. See
UQ[PY]LAB User Manual – the INPUT
module for more sampling
techniques.
X N × M List of lists with
Float entries
Matrix containing the initial
experimental design.
G N × N
out
List with Float
entries
Vector containing the responses of
the limit-state function
corresponding to the initial
experimental design, corrected by
the threshold k (see also Table 5):
(g(x) T ) for Criterion = '<=',
(T g(x)) for Criterion = '>='.
Asynchronous learning can be enabled when a computational model is not directly associated
to the analysis. In this case, the analysis is interrupted and the next sample to add to the
experimental design is returned.
Table 12: ALROpts['Async']
Enable Boolean
default: False
Enabling or not the asynchronous
learning option.
True Asynchronous learning is enabled.
False Asynchronous learning is disabled.
InitED Boolean
default: False
Enabling or not the asynchronous
learning option for the initial
experimental design.
True Asynchronous learning is enabled for
the initial experimental design.
False Asynchronous learning is disabled
for the initial experimental design.
UQ[PY]LAB-V1.0-117 - 30 -
Active learning reliability
3.2 Accessing the results
Syntax
myAnalysis = uq.createAnalysis(ALROpts)
Output
The results are summarized in Table 13.
Table 13: myAnalysis['Results']
Pf Float Estimator of the failure probability,
b
P
f
.
Beta Float Associated reliability index,
b
β = Φ
1
(
b
P
f
).
CoV Float Coefficient of variation.
ModelEvaluations Integer Total number of model evaluations performed
during the analysis.
PfCI 1 × 2 List with
Float entries
Confidence interval of the failure probability.
BetaCI 1 × 2 List with
Float entries
Confidence interval of the associated reliability
index.
Metamodel uq_model Final surrogate model used in the analysis.
Reliability uq_analysis Final reliability analysis carried out.
History See Table 14 History of the active learning reliability
analysis.
Xnext K × M List of
lists with Float
entries
Next sample(s) to evaluate to add to the
experimental design.
Only available when
['Async']['Enable'] is True .
Snapshot String Path to the .mat file containing a snapshot of
the analysis.
Only available when
['Async']['Enable'] is True .
The history of the active learning process is saved in the ['History'] key. Its contents is
described in Table 14.
UQ[PY]LAB-V1.0-117 - 31 -
UQ[PY]LAB user manual
Table 14: myAnalysis['Results']['History']
Pf List with Float
entries
Failure probability estimate before each
enrichment.
PfLower List with Float
entries
History of the estimated lower bound of the
failure probability P
f
.
PfUpper List with Float
entries
History of the estimated upper bound of the
failure probability P
+
f
.
NSamples Integer Number of samples added to the experimental
design at each iteration.
NCurrent List with
Integer entries
History of the experimental design size.
NInit Integer Number of samples in the initial experimental
design.
X N × M List of
lists with Float
entries
Samples in the experimental design for the
given output.
G N × N
out
List
of lists with
Float entries
Values of the limit-state function of the
experimental design samples corrected by the
threshold T (see also Table 5):
(g(x) T ) for Criterion = '<=',
(T g(x)) for Criterion = '>='.
ReliabilitySample List of lists with
Float entries
Samples used in the latest reliability analysis.
Convergence List with Float
entries
History of the convergence criterion values.
3.3 Printing/Visualizing of the results
UQ[PY]LAB offers two commands to conveniently print reports containing contextually rele-
vant information for a given result object:
3.3.1 Printing the results: uq.print
Syntax
uq.print(myAnalysis[, outidx])
Description
uq.print(myAnalysis) prints a report on the results of the reliability analysis stored in
the object myAnalysis. If the model has multiple outputs, only the results for the first
output variable are printed.
UQ[PY]LAB-V1.0-117 - 32 -
Active learning reliability
uq.print(myAnalysis, outidx) prints a report on the results of the reliability analysis
stored in the object myAnalysis for the output variables specified in the array outidx.
Examples:
uq.print(myAnalysis, [1, 3]) prints the reliability analysis results for output variables
1 and 3.
3.3.2 Graphically display the results: uq.display
Syntax
uq.display(myAnalysis[, outidx])
Description
uq.display(myAnalysis) creates a visualization of the results of the reliability analysis
stored in the object myAnalysis, if possible. If the model has multiple outputs, only
the results for the first output variable are visualized.
uq.display(myAnalysis, outidx) creates a visualization of the results of the reliability
analysis stored in the object myAnalysis for the output variables specified in the array
outidx.
Examples:
uq.display(myAnalysis, [1, 3]) will display the reliability analysis results for output
variables 1 and 3.
UQ[PY]LAB-V1.0-117 - 33 -
References
Au, S. K. and Beck, J. L. (2001). Estimation of small failure probabilities in high dimensions
by subset simulation. Probabilistic Engineering Mechanics, 16(4):263–277. 29
Basudhar, A. and Missoum, S. (2008). An improved adaptive sampling scheme for the con-
struction of explicit boundaries. Struct. Multidisc. Optim., 42(4):517–529. 8
Bichon, B. J., Eldred, M. S., Swiler, L., Mahadevan, S., and McFarland, J. (2008). Effi-
cient global reliability analysis for nonlinear implicit performance functions. AIAA Journal,
46(10):2459–2468. 7
Ditlevsen, O. and Madsen, H. (1996). Structural reliability methods. J. Wiley and Sons,
Chichester. 3
Echard, B., Gayton, N., and Lemaire, M. (2011). AK-MCS: an active learning reliability
method combining Kriging and Monte Carlo simulation. Struct. Saf., 33(2):145–154. 7
Lemaire, M. (2009). Structural reliability. Wiley. 3
Marelli, S. and Sudret, B. (2018). An active-learning algorithm that combines sparse polyno-
mial chaos expansions and bootstrap for structural reliability analysis. Struct. Saf., 75:67–
74. 7
Melchers, R.-E. (1999). Structural reliability analysis and prediction. John Wiley & Sons. 3
Moustapha, M., Marelli, S., and Sudret, B. (2021). A generalized framework for active learn-
ing reliability: survey and benchmark. Reliability Engineering & System Safety. (submitted).
4, 14
Moustapha, M. and Sudret, B. (2019). Surrogate-assisted reliability-based design optimiza-
tion: a survey and a unified modular framework. Struct. Multidisc. Optim., 60:1–20. 8
Sudret, B. (2007). Uncertainty propagation and sensitivity analysis in mechanical models -
Contributions to structural reliability and stochastic spectral methods. Habilitation thesis,
Universit
´
e Blaise Pascal, Clermont-Ferrand, France. 1
Zaki, M. J. and Meira, W. J. (2014). Data Mining and Analysis: fundamental Concepts and
Algorithms. Cambridge University Press. 10
35