fit.Kriging {rlibkriging} | R Documentation |
Fit Kriging
object on given data.
Description
The hyper-parameters (variance and vector of correlation ranges)
are estimated thanks to the optimization of a criterion given by
objective
, using the method given in optim
.
Usage
## S3 method for class 'Kriging'
fit(
object,
y,
X,
regmodel = c("constant", "linear", "interactive"),
normalize = FALSE,
optim = c("BFGS", "Newton", "none"),
objective = c("LL", "LOO", "LMP"),
parameters = NULL,
...
)
Arguments
object |
S3 Kriging object. |
y |
Numeric vector of response values. |
X |
Numeric matrix of input design. |
regmodel |
Universal Kriging linear trend. |
normalize |
Logical. If |
optim |
Character giving the Optimization method used to fit
hyper-parameters. Possible values are: |
objective |
Character giving the objective function to
optimize. Possible values are: |
parameters |
Initial values for the hyper-parameters. When
provided this must be named list with elements |
... |
Ignored. |
Value
No return value. Kriging object argument is modified.
Author(s)
Yann Richet yann.richet@irsn.fr
Examples
f <- function(x) 1 - 1 / 2 * (sin(12 * x) / (1 + x) + 2 * cos(7 * x) * x^5 + 0.7)
plot(f)
set.seed(123)
X <- as.matrix(runif(10))
y <- f(X)
points(X, y, col = "blue", pch = 16)
k <- Kriging("matern3_2")
print(k)
fit(k,y,X)
print(k)