Learn R Programming

rlibkriging (version 1.2-3)

predict.WarpKriging: Predict with a WarpKriging model

Description

Predict with a WarpKriging model

Usage

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

Value

list with mean, optionally stdev, cov,

mean_deriv, stdev_deriv

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

Examples

Run this code
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))

Run the code above in your browser using DataLab