krigingsm: Create a kriging adapter class for the objects codekm of...

Description Usage Format Details Fields Methods Examples

Description

krigingsm is a kriging adapter. It makes the use of the universal distirbution easier

Usage

1
# kriging     <- krigingsm$new()

Format

An R6Class generator object

Details

It construct a kriging model from the package DiceKriging and it inherits form the sm. The inheritance of the class sm is required when one want to use the universal distribution

Fields

model_name

: Default "Kriging"

type

: universal kriging "UK" or simple kriging "SK"

Methods

krigingsm$new(x=NULL,y=NULL,parameters = NULL, type= "UK")

Creates a new krigingsm object.

train()

train the surrogate model.

predict(newdata)

it predicts the new data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(UP)
d            <- 2;
X    	      <- expand.grid(x1=s <- seq(0,1, length=5), x2=s)
Xtest	      <- expand.grid(x1=seq(0,1,length=10), x2=seq(0,1,length=10))
Y            <- apply(X, 1, branin)
sm = krigingsm$new()
sm$setDOE(X,Y)
sm$train() 
predictions <- sm$predict(Xtest)


   

malekbs/UP documentation built on May 14, 2019, 8:05 a.m.