View source: R/NuggetKrigingClass.R
fit.NuggetKriging | R Documentation |
NuggetKriging
object on given data.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
.
## S3 method for class 'NuggetKriging'
fit(
object,
y,
X,
regmodel = c("constant", "linear", "interactive", "none"),
normalize = FALSE,
optim = c("BFGS", "none"),
objective = c("LL", "LMP"),
parameters = NULL,
...
)
object |
S3 NuggetKriging object. |
y |
Numeric vector of response values. |
X |
Numeric matrix of input design. |
regmodel |
Universal NuggetKriging
|
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 some elements |
... |
Ignored. |
No return value. NuggetKriging object argument is modified.
Yann Richet yann.richet@irsn.fr
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) + 0.1 * rnorm(nrow(X))
points(X, y, col = "blue", pch = 16)
k <- NuggetKriging("matern3_2")
print(k)
fit(k,y,X)
print(k)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.