predict.WarpKriging: Predict with a WarpKriging model

View source: R/WarpKrigingClass.R

predict.WarpKrigingR Documentation

Predict with a WarpKriging model

Description

Predict with a WarpKriging model

Usage

## S3 method for class 'WarpKriging'
predict(
  object,
  x,
  return_stdev = TRUE,
  return_cov = FALSE,
  return_deriv = FALSE,
  ...
)

Arguments

object

WarpKriging object

x

prediction matrix (m x d)

return_stdev

return standard deviations?

return_cov

return full covariance?

return_deriv

return derivatives of mean and stdev wrt x?

...

ignored

Value

list with mean, optionally stdev, cov, mean_deriv, stdev_deriv

Examples

f <- function(x) 1 - 1 / 2 * (sin(12 * x) / (1 + x) + 2 * cos(7 * x) * x^5 + 0.7)
X <- as.matrix(seq(0.05, 0.95, length.out = 10))
y <- f(X)

wk <- WarpKriging(y, X, warping = "kumaraswamy", kernel = "gauss", optim = "BFGS")
x <- as.matrix(seq(0, 1, length.out = 101))
p <- wk$predict(x, return_stdev = TRUE)

plot(f)
points(X, y, col = "blue", pch = 16)
lines(x, p$mean, col = "blue")
polygon(c(x, rev(x)), c(p$mean - 2 * p$stdev, rev(p$mean + 2 * p$stdev)),
        border = NA, col = rgb(0, 0, 1, 0.2))

rlibkriging documentation built on July 12, 2026, 5:06 p.m.