predict.cobbsGPR: Predict GPR Model

View source: R/gaussianProcessRegression.R

predict.cobbsGPRR Documentation

Predict GPR Model

Description

Predict with GPR model produced by gaussianProcessRegression.

Usage

## S3 method for class 'cobbsGPR'
predict(object, newdata, ...)

Arguments

object

GPR model (settings and parameters) of class cobbsGPR.

newdata

design matrix to be predicted

...

not used

Value

list with predicted mean y, uncertainty / standard deviation 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

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)
fit$target <- c("y","s","ei")
## first estimate error with regressive predictor
predict(fit,x)


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