predictGPRReinterpolation: Predict GPR Model (Re-interpolating)

View source: R/gaussianProcessRegression.R

predictGPRReinterpolationR Documentation

Predict GPR Model (Re-interpolating)

Description

GPR predictor with re-interpolation to avoid stalling the optimization process which employs this model as a surrogate. This is supposed to be used with deterministic experiments, which do need a non-interpolating model that avoids predicting non-zero error at sample locations. This can be useful when the model is deterministic (i.e. repeated evaluations of one parameter vector do not yield different values) but does have a "noisy" structure (e.g. due to computational inaccuracies, systematical error).

Usage

predictGPRReinterpolation(object, newdata, ...)

Arguments

object

GPR model (settings and parameters) of class cobbsGPR.

newdata

design matrix to be predicted

...

not used

Details

Please note that this re-interpolation implementation will not necessarily yield values of exactly zero at the sample locations used for model building. Slight deviations can occur.

Value

list with predicted mean y, uncertainty s (optional) and expected improvement ei (optional). Whether s and ei are returned is specified by the vector of strings object$target, which then contains "s" and "ei.

See Also

gaussianProcessRegression, predict.cobbsGPR

Examples

## Test-function:
braninFunction <- function (x) {	
	(x[2]  - 5.1/(4 * pi^2) * (x[1] ^2) + 5/pi * x[1]  - 6)^2 + 
10 * (1 - 1/(8 * pi)) * cos(x[1] ) + 10
}
## Create design points
x <- cbind(runif(20)*15-5,runif(20)*15)
## Compute observations at design points (for Branin function)
y <- as.matrix(apply(x,1,braninFunction))
## Create model
fit <- gaussianProcessRegression(x,y,control=list(reinterpolate=FALSE))
fit$target <- c("y","s")
## first estimate error with regressive predictor
sreg <- predict(fit,x)$s
## now estimate error with re-interpolating predictor
sreint <- predictGPRReinterpolation(fit,x)$s
## equivalent:
fit$reinterpolate <- TRUE
sreint2 <- predict(fit,x)$s
print(sreg)
print(sreint)
print(sreint2)
## sreint should be close to zero, significantly smaller than sreg


martinzaefferer/COBBS documentation built on July 19, 2023, 4:12 a.m.