| metafunction {sensobol} | R Documentation |
Random metafunction based on Becker (2020)'s metafunction.
Description
Random metafunction based on Becker (2020)'s metafunction.
Usage
metafunction(data, k_2 = 0.5, k_3 = 0.2, epsilon = NULL)
Arguments
data |
A numeric matrix where each column is a model input and each row a sampling point. |
k_2 |
Numeric value indicating the fraction of active pairwise interactions (between 0 and 1).
Default is |
k_3 |
Numeric value indicating the fraction of active three-wise interactions
(between 0 and 1). Default is |
epsilon |
Integer value. It fixes the seed for the random number generator.
The default is |
Details
The metafunction randomly combines the following functions in a metafunction of dimension k:
-
f(x) = x ^ 3(cubic). -
f(x) = 1~\mbox{if}(x > 0.5), 0~\mbox{otherwise}(discontinuous). -
f(x) = \frac{e ^ x}{e - 1}(exponential). -
f(x) = \frac{10 - 1}{1.1} ^ {-1} (x + 0.1) ^ {-1}(inverse). -
f(x) = x(linear) -
f(x) = 0(no effect). -
f(x) = 4(x - 0.5) ^ 2(non-monotonic). -
f(x) = \frac{\sin (2 \pi x)}{2}(periodic). -
f(x) = x ^ 2(quadratic). -
f(x) = \cos(x)(trigonometric).
It is constructed as follows:
y=\sum_{i=1}^{k}\alpha_i f^{u_i}(x_i) \\
+ \sum_{i=1}^{k_2}\beta_i f^{u_{V_{i,1}}}(x_{V_{i,1}}) f^{u_{V_{i,2}}} (x_{V_{i,2}}) \\
+ \sum_{i=1}^{k_3}\gamma_i f^{u_{W_{i,1}}}(x_{W_{i,1}}) f^{u_{W_{i,2}}}(x_{W_{i,2}}) f^{u_{W_{i,3}}} (x_{W_{i,3}})
where k is the model dimensionality, u is a k-length vector formed by randomly
sampling with replacement the ten functions mentioned above, V and W are two matrices specifying the
number of pairwise and three-wise interactions given the model dimensionality,
and \mathbf{\alpha}, \mathbf{\beta}, \mathbf{\gamma} are three
vectors of length k generated by sampling from a mixture of two normal distributions
\Psi=0.3\mathcal{N}(0, 5) + 0.7\mathcal{N}(0, 0.5).
See Puy et al. (2020) and Becker (2020) for a full
mathematical description of the metafunction approach.
Value
A numeric vector with the function output.
References
Becker W (2020).
“Metafunctions for benchmarking in sensitivity analysis.”
Reliability Engineering and System Safety, 204, 107189.
doi:10.1016/j.ress.2020.107189.
Puy A, Becker W, Piano SL, Saltelli A (2020).
“The battle of total-order sensitivity estimators.”
arXiv.
2009.01147, https://arxiv.org/abs/2009.01147.
Examples
# Define settings (number of model inputs = 86)
N <- 100; params <- paste("X", 1:86, sep = "")
# Create sample matrix
mat <- sobol_matrices(N = N, params = params)
# Compute metafunction
Y <- metafunction(mat)