Two-dimensional Function from Alemazkoor and Meidani (2018)

Two-dimensional Function from Alemazkoor and Meidani (2018)#

import numpy as np
import matplotlib.pyplot as plt
import uqtestfuns as uqtf

The test function from [AM18] (or Alemazkoor2D for short) is a two-dimensional polynomial function. It was used as a test function for a metamodeling exercise (i.e., sparse polynomial chaos expansion). The function features a low-dimensional polynomial function (two-dimensional) with a high degree (a total degree of \(20\)); in other words, the function is low in dimension but of high-degree.

The surface and contour plots of the Alemazkoor2D function are shown below.

../_images/366cbad072a394344860906df16e861b04cf5b93b0062609d8142b0559f9b8f3.png

Test function instance#

To create a default instance of the Alemazkoor2D function:

my_testfun = uqtf.Alemazkoor2D()

Check if it has been correctly instantiated:

print(my_testfun)
Function ID      : Alemazkoor2D
Input Dimension  : 2 (fixed)
Output Dimension : 1
Parameterized    : False
Description      : Low-dimensional high-degree polynomial from Alemazkoor & Meidani (2018)
Applications     : metamodeling

Description#

The Alemazkoor2D function is defined as follows:

\[ \mathcal{M}(\boldsymbol{x}) = \sum_{i = 1}^{5} x_1^{2i} x_2^{2i} \]

where \(\boldsymbol{x} = \{ x_1, x_2 \}\) is the two-dimensional vector of input variables further defined below.

Probabilistic input#

Based on [AM18], the probabilistic input model for the function consists of two independent random variables as shown below.

Hide code cell source
print(my_testfun.prob_input)
Function ID     : Alemazkoor2D
Input ID        : Alemazkoor2018
Input Dimension : 2
Description     : Input specification for the 2D test function from
                  Alemazkoor & Meidani (2018)
Marginals       :

 No.    Name    Distribution    Parameters    Description
-----  ------  --------------  ------------  -------------
  1      X1       uniform       [-1.  1.]          -
  2      X2       uniform       [-1.  1.]          -

Copulas         : Independence

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:

Hide code cell source
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);
../_images/49e527fc568f8a2c3c499f6a85b8cd4c4ab012daf55ce8d178a690288c8a8c85.png

References#

[AM18] (1,2)

Negin Alemazkoor and Hadi Meidani. A near-optimal sampling strategy for sparse recovery of polynomial chaos expansions. Journal of Computational Physics, 371:137–151, 2018. doi:10.1016/j.jcp.2018.05.025.