update.km: Update of a kriging model

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/kmStruct.R

Description

Update a km object when one or many new observations are added. Many, but not all, fields of the km object need to be recalculated when new observations are added. It is also possible to modify the k last (existing) observations.

Usage

1
2
3
4
## S4 method for signature 'km'
update(object, newX, newy, newX.alreadyExist = FALSE,
          cov.reestim = TRUE, trend.reestim = TRUE, nugget.reestim = FALSE, 
          newnoise.var = NULL, kmcontrol = NULL, newF = NULL,...)

Arguments

object

Kriging model of km class.

newX

Matrix with object@d columns and r rows corresponding to the r locations of the observations to be updated. These locations can be new locations or existing ones.

newy

Matrix with one column and r rows corresponding to the r responses at the r locations newX.

newX.alreadyExist

Boolean: indicate whether the locations newX are all news or not.

cov.reestim

Should the covariance parameters of the km object be re-estimated?

trend.reestim

Should the trend parameters be re-estimated?

nugget.reestim

Should the nugget effect be re-estimated?

newnoise.var

Vector containing the noise variance at each new observations.

kmcontrol

Optional list representing the control variables for the re-estimation of the kriging model once new points are sampled. The items are the same as in km

newF

Optional matrix containing the value of the trend at the new locations. Setting this argument avoids a call to an expensive function.

...

Further arguments

Value

Updated km object

Author(s)

Clement Chevalier (IMSV, Switzerland, and IRSN, France)

References

Bect J., Ginsbourger D., Li L., Picheny V., Vazquez E. (2010), Sequential design of computer experiments for the estimation of a probability of failure, Statistics and Computing, pp.1-21, 2011, https://arxiv.org/abs/1009.5177

Chevalier C., Bect J., Ginsbourger D., Vazquez E., Picheny V., Richet Y. (2011), Fast parallel kriging-based stepwise uncertainty reduction with application to the identification of an excursion set, https://hal.archives-ouvertes.fr/hal-00641108/

See Also

km

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
set.seed(8)
N <- 9 # number of observations
testfun <- branin

# a 9 points initial design 
design <- expand.grid(x1=seq(0,1,length=3), x2=seq(0,1,length=3))
response <- testfun(design)

# km object with matern3_2 covariance
# params estimated by ML from the observations
model <- km(formula = ~., design = design, 
	response = response, covtype = "matern3_2")
model@covariance

newX <- matrix(c(0.4,0.5), ncol = 2) #the point that we are going to add in the km object
newy <- testfun(newX)
newmodel <- update(object = model, newX = newX, newy = newy, cov.reestim = TRUE)
newmodel@covariance

Example output

optimisation start
------------------
* estimation method   : MLE 
* optimisation method : BFGS 
* analytical gradient : used
* trend model : ~x1 + x2
* covariance model : 
  - type :  matern3_2 
  - nugget : NO
  - parameters lower bounds :  1e-10 1e-10 
  - parameters upper bounds :  2 2 
  - best initial criterion value(s) :  -53.40287 

N = 2, M = 5 machine precision = 2.22045e-16
At X0, 0 variables are exactly at the bounds
At iterate     0  f=       53.403  |proj g|=      0.52892
At iterate     1  f =       53.172  |proj g|=   1.4901e-137
Bad direction in the line search;
   refresh the lbfgs memory and restart the iteration.
Derivative >= 0, backtracking line search impossible.final  value 53.171961 
stopped after 1 iterations

Covar. type  : matern3_2 
Covar. coeff.:
               Estimate
   theta(x1)     0.0026
   theta(x2)     0.0000

Variance estimate: 7927.668

optimisation start
------------------
* estimation method   : MLE 
* optimisation method : BFGS 
* analytical gradient : used
* trend model : ~x1 + x2
* covariance model : 
  - type :  matern3_2 
  - nugget : NO
  - parameters lower bounds :  1e-10 1e-10 
  - parameters upper bounds :  2 2 
  - best initial criterion value(s) :  -58.13399 

N = 2, M = 5 machine precision = 2.22045e-16
At X0, 0 variables are exactly at the bounds
At iterate     0  f=       58.134  |proj g|=      0.75161
At iterate     1  f =       58.119  |proj g|=       0.19813
At iterate     2  f =       58.118  |proj g|=      0.013799
At iterate     3  f =       58.118  |proj g|=     0.0038491
At iterate     4  f =       58.118  |proj g|=       0.25503
At iterate     5  f =       58.118  |proj g|=       0.26064
At iterate     6  f =       58.117  |proj g|=       0.30168
At iterate     7  f =       58.117  |proj g|=       0.36107
At iterate     8  f =       58.116  |proj g|=       0.39899
At iterate     9  f =       58.113  |proj g|=        0.2798
At iterate    10  f =       58.111  |proj g|=      0.019397
At iterate    11  f =       58.111  |proj g|=       0.00916
At iterate    12  f =       58.111  |proj g|=    0.00048468
At iterate    13  f =       58.111  |proj g|=    1.1392e-05

iterations 13
function evaluations 25
segments explored during Cauchy searches 13
BFGS updates skipped 0
active bounds at final generalized Cauchy point 0
norm of the final projected gradient 1.13923e-05
final function value 58.1106

F = 58.1106
final  value 58.110562 
converged

Covar. type  : matern3_2 
Covar. coeff.:
               Estimate
   theta(x1)     0.3343
   theta(x2)     0.2875

Variance estimate: 8424.715

DiceKriging documentation built on Feb. 24, 2021, 1:07 a.m.