fit.NoiseKriging: Fit 'NoiseKriging' object on given data.

View source: R/NoiseKrigingClass.R

fit.NoiseKrigingR Documentation

Fit NoiseKriging 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 'NoiseKriging'
fit(
  object,
  y,
  noise,
  X,
  regmodel = c("constant", "linear", "interactive", "none"),
  normalize = FALSE,
  optim = c("BFGS", "none"),
  objective = c("LL"),
  parameters = NULL,
  ...
)

Arguments

object

S3 NoiseKriging object.

y

Numeric vector of response values.

noise

Numeric vector of response variances.

X

Numeric matrix of input design.

regmodel

Universal NoiseKriging "linear", "interactive", "quadratic".

normalize

Logical. If TRUE both the input matrix X and the response y in normalized to take values in the interval [0, 1].

optim

Character giving the Optimization method used to fit hyper-parameters. Possible values are: "BFGS" and "none", the later simply keeping the values given in parameters. The method "BFGS" uses the gradient of the objective (note that "BGFS10" means 10 multi-start of BFGS).

objective

Character giving the objective function to optimize. Possible values are: "LL" for the Log-Likelihood.

parameters

Initial values for the hyper-parameters. When provided this must be named list with elements "sigma2" and "theta" containing the initial value(s) for the variance and for the range parameters. If theta is a matrix with more than one row, each row is used as a starting point for optimization.

...

Ignored.

Value

No return value. NoiseKriging 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) + X/10 * rnorm(nrow(X)) # add noise dep. on X
points(X, y, col = "blue", pch = 16)

k <- NoiseKriging("matern3_2")
print(k)

fit(k,y,noise=(X/10)^2,X)
print(k)

rlibkriging documentation built on Oct. 3, 2024, 1:06 a.m.