Bratley et al. (1992) A function#
import numpy as np
import matplotlib.pyplot as plt
import uqtestfuns as uqtf
The Bratley et al. (1992) A function (or Bratley1992a function for short),
is an \(M\)-dimensional scalar-valued function.
The function was introduced in [BFN92] as a test function
for multi-dimensional numerical integration using low discrepancy sequences.
Note
There are four other test functions used in Bratley et al. [BFN92]:
Bratley et al. (1992) A: A product of an absolute function (this function)
Bratley et al. (1992) B: A product of a trigonometric function
Bratley et al. (1992) C: A product of the Chebyshev polynomial of the first kind
Bratley et al. (1992) D: A sum of product
This function was reintroduced in [SSobol95] with additional parameters for global sensitivity analysis purposes. The “generalized” function became known as the Sobol’-G.
The plots for one-dimensional and two-dimensional Bratley1992a functions
are shown below.
Test function instance#
To create a default instance of the test function:
my_testfun = uqtf.Bratley1992a()
Check if it has been correctly instantiated:
print(my_testfun)
Function ID : Bratley1992a
Input Dimension : 2 (variable)
Output Dimension : 1
Parameterized : False
Description : Integration test function #1 from Bratley et al. (1992)
Applications : integration, sensitivity
By default, the input dimension is set to \(2\)[1].
To create an instance with another value of input dimension,
pass an integer to the parameter input_dimension (keyword only).
For example, to create an instance of 10-dimensional Bratley1992a function,
type:
my_testfun = uqtf.Bratley1992a(input_dimension=10)
Description#
The Bratley1992a function is defined as follows[2]:
where \(\boldsymbol{x} = \{ x_1, \ldots, x_M \}\) is the \(M\)-dimensional vector of input variables further defined below.
Probabilistic input#
Based on [BFN92], the test function is integrated over the hypercube domain of \([0, 1]^M\). Such an input specification can be modeled using an \(M\) independent uniform random variables as shown in the table below.
No. |
Name |
Distribution |
Parameters |
Description |
|---|---|---|---|---|
1 |
\(x_1\) |
uniform |
[0.0 1.0] |
N/A |
\(\vdots\) |
\(\vdots\) |
\(\vdots\) |
\(\vdots\) |
\(\vdots\) |
M |
\(x_M\) |
uniform |
[0.0 1.0] |
N/A |
Reference results#
This section provides several reference results of typical UQ analyses involving the test function.
Definite integration#
The integral value of the function over the domain of \([0.0, 1.0]^M\) is analytical:
Moments#
The moments of the test function are analytically known and the first two moments are given below.
Expected value#
Due to the domain being a hypercube, the above integral value over the domain is the same as the expected value:
Variance#
The analytical value for the variance is given as follows:
The table below shows the numerical values of the variance for several selected dimensions.
Dimension |
\(I[\mathcal{M}]\) |
|---|---|
1 |
\(3.3333333 \times 10^{-1}\) |
2 |
\(7.7777778 \times 10^{-1}\) |
3 |
\(1.3703704 \times 10^{0}\) |
4 |
\(2.1604938 \times 10^{0}\) |
5 |
\(3.2139918 \times 10^{0}\) |
6 |
\(4.6186557 \times 10^{0}\) |
7 |
\(6.4915409 \times 10^{0}\) |
8 |
\(8.9887212 \times 10^{0}\) |
9 |
\(1.2318295 \times 10^{1}\) |
10 |
\(1.6757727 \times 10^{1}\) |
The variance grows as the number of dimensions and becomes unbounded for a very large dimension.
References#
Andrea Saltelli and Ilya M. Sobol'. About the use of rank transformation in sensitivity analysis of model output. Reliability Engineering & System Safety, 50(3):225–239, 1995. doi:10.1016/0951-8320(95)00099-2.
Paul Bratley, Bennett L. Fox, and Harald Niederreiter. Implementation and tests of low-discrepancy sequences. ACM Transactions on Modeling and Computer Simulation, 2(3):195–213, 1992. doi:10.1145/146382.146385.