Two-Dimensional Function from Webster et al. (1996)
Contents
Two-Dimensional Function from Webster et al. (1996)#
import numpy as np
import matplotlib.pyplot as plt
import uqtestfuns as uqtf
The 2D function introduced in [WTM96] is a polynomial function. It was used to illustrate the construction of a polynomial chaos expansion metamodel (via stochastic collocation) having uncertain (random) input variables.
Test function instance#
To create a default instance of the test function:
my_testfun = uqtf.Webster2D()
Check if it has been correctly instantiated:
print(my_testfun)
Name : Webster2D
Spatial dimension : 2
Description : 2D polynomial function from Webster et al. (1996).
Description#
The Webster 2D function is defined as follows1:
where \(\boldsymbol{x} = \{ A, B \}\) is the two-dimensional vector of input variables further defined below.
Probabilistic input#
Based on [WTM96], the probabilistic input model for the function consists of two independent random variables as shown below.
my_testfun.prob_input
Name: Webster1996
Spatial Dimension: 2
Description: Input specification for the 2D function from Webster et al. (1996)
Marginals:
No. | Name | Distribution | Parameters | Description |
---|---|---|---|---|
1 | A | uniform | [ 1. 10.] | None |
2 | B | normal | [2. 1.] | None |
Copulas: None
Reference results#
This section provides several reference results of typical UQ analyses involving the test function.
Sample histogram#
Shown below is the histogram of the output based on \(100'000\) random points:
xx_test = my_testfun.prob_input.get_sample(100000)
yy_test = my_testfun(xx_test)
plt.hist(yy_test, bins="auto", color="#8da0cb");
plt.grid();
plt.ylabel("Counts [-]");
plt.xlabel("$\mathcal{M}(\mathbf{X})$");
plt.gcf().set_dpi(150);
References#
- WTM96(1,2,3)
M. D. Webster, M. A. Tatang, and G. J. McRae. Application of the probabilistic collocation method for an uncertainty analysis of a simple ocean model. Technical Report Joint Program Report Series No. 4, Massachusetts Institute of Technology, Cambridge, MA, 1996. URL: http://globalchange.mit.edu/publication/15670.