View source: R/WarpKrigingClass.R
| WarpKriging | R Documentation |
Kriging with per-variable input warping. Each input dimension is independently transformed before the GP kernel is evaluated. Supports continuous, categorical, ordinal variables and joint deep kernel learning.
WarpKriging(
y,
X,
warping,
kernel = "gauss",
regmodel = "constant",
normalize = FALSE,
optim = "BFGS+Adam",
objective = "LL",
parameters = NULL,
noise = NULL
)
y |
numeric vector of observations (n) |
X |
numeric matrix of inputs (n x d) |
warping |
character vector of warp specifications, one per column
of X. Use |
kernel |
covariance kernel: "gauss", "matern3_2", "matern5_2", "exp" |
regmodel |
trend: "constant", "linear", "quadratic" |
normalize |
logical; normalise continuous inputs? |
optim |
optimiser (currently only one bi-level strategy) |
objective |
"LL" (log-likelihood) |
parameters |
optional named list of tuning parameters,
e.g. |
noise |
Either a numeric vector of per-observation noise variances,
or |
An S3 object of class "WarpKriging".
# Continuous with Kumaraswamy warping
X <- as.matrix(c(0.0, 0.25, 0.5, 0.75, 1.0))
f <- function(x) 1 - 1/2 * (sin(12*x)/(1+x) + 2*cos(7*x)*x^5 + 0.7)
y <- f(X)
k <- WarpKriging(y, X, warping = "kumaraswamy", kernel = "gauss")
print(k)
# Mixed: 1 continuous + 1 categorical (3 levels)
n <- 15
X_mix <- cbind(runif(n), rep(0:2, length.out = n))
y_mix <- sin(2 * pi * X_mix[, 1]) * c(1, 2, 0.5)[X_mix[, 2] + 1]
k2 <- WarpKriging(y_mix, X_mix,
warping = c("mlp(16:8,2,selu)", "categorical(3,2)"),
kernel = "matern5_2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.