UPSM is a class for a surrogate model ready to be used in a UP framework.

UPSM

Format

An R6Class generator object

Details

It contains a surrogate model and a UPClass. The UPSM sets the set of submodels and perform UP predictions.

Fields

sm:

a surrogate model of class sm

UP:

a class UPClass

submodels:

list of submodels

Methods

UPSM$new(sm = NULL, UP=NULL)

Creates a new UPSM object, and intialize the submodels.

uppredict(newData)

The UP prediction of the new data.

Examples

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)