Sine Function from Higdon (2002)#
import numpy as np
import matplotlib.pyplot as plt
import uqtestfuns as uqtf
The function is a simple one-dimensional, scalar-valued test function. It was featured in [Hig02] as an example for illustrating a multi-resolution spatial modeling technique.
A plot of the function is shown below..
Note
In the original paper, the function was evaluated at 30 equispaced points in \([1.0, 10.0]\) with added i.i.d noise from \(\mathcal{N} \sim (0, 0.1)\); these points are shown in the above plot.
Test function instance#
To create a default instance of the test function:
my_testfun = uqtf.HigdonSine()
Check if it has been correctly instantiated:
print(my_testfun)
Function ID : HigdonSine
Input Dimension : 1 (fixed)
Output Dimension : 1
Parameterized : False
Description : Sine function from Higdon (2002)
Applications : metamodeling
Description#
The test function is analytically defined as follows[1]:
where \(x\) is further defined below.
Notice that the second term of the equation gives variation 5 times smaller but 4 times faster.
Probabilistic input#
The probabilistic input model for the test function is shown below.
Show code cell source
print(my_testfun.prob_input)
Function ID : HigdonSine
Input ID : Higdon2002
Input Dimension : 1
Description : Input model for the sine function from Higdon (2002)
Marginals :
No. Name Distribution Parameters Description
----- ------ -------------- ------------ -------------
1 x uniform [ 1. 10.] -
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:
Show code cell source
my_testfun.prob_input.reset_rng(42)
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}(X)$");
plt.gcf().tight_layout(pad=3.0)
plt.gcf().set_dpi(150);
References#
Dave Higdon. Quantitative methods for current environmental issues, chapter Space and space-time modeling using process convolutions, pages 37–56. Springer London, 2002. doi:10.1007/978-1-4471-0657-9_2.