UPSM
is a class for a surrogate model
ready to be used in a UP framework.
UPSM
An R6Class
generator object
It contains a surrogate model and a UPClass. The UPSM sets the set of submodels and perform UP predictions.
sm:
a surrogate model of class sm
UP:
a class UPClass
submodels:
list of submodels
UPSM$new(sm = NULL, UP=NULL)
Creates a new UPSM
object,
and intialize the submodels.
uppredict(newData)
The UP prediction of the new data.
library(UP) d <- 2 n <- 16 testdata <- expand.grid(x1=s <- seq(0,1, length=10), x2=s) X <- expand.grid(x1=seq(0,1,length=5), x2=seq(0,1,length=4)) y <- apply(X, 1, branin) upsm <- UPSM$new(sm= krigingsm$new(), UP=UPClass$new(X,y,Scale =TRUE)) predictions <- upsm$uppredict(testdata)