build_surmodel: Build an surmodel object

Description Usage Arguments Value Examples

Description

Build an surmodel object

Usage

1
2
build_surmodel(fn, n_in, d_in, doe_type = "rlhs", sur_type = "mkm",
  pre_process = NULL, post_process = NULL)

Arguments

fn

high fidelity function (fun must return a list of vectors with the format list(y = c(y1, y2, y3), g = c(g1, g2))). Alternatively, it can e a data.frame with names such as X.1, X.2, Y.1, G.1, G.2, G3

n_in, d_in

integer number of observations and dimension of the input variables

doe_type

string that defines the doe generation scheme (list valid schemes)

sur_type

string that defines the surogate type (list valid types)

pre_process

string vector defining the pre processing functions

post_process

string vector defining the post processing

Value

surogate model

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
fn <- function(x) list(y = x^2)
model <- build_surmodel(fn, 20, 1)

fn <- function(x) list(y = DiceKriging::branin(x))
model <- build_surmodel(fn, 20, 2)

fn <- function(x) list(y = DiceKriging::branin(x), g = 0.2 - prod(x))
model <- build_surmodel(fn, 20, 2)

fn <- shaffer2
model <- build_surmodel(fn, 20, 1)

fn <- binh
model <- build_surmodel(fn, 20, 2)

data <- data.frame(X.1 = runif(5), X.2 = runif(5), Y.1 = runif(5))
model <- build_surmodel(data)

data <- data.frame(X.1 = runif(5), X.2 = runif(5), Y.1 = runif(5), G.1 = rnorm(5))
model <- build_surmodel(data)

suropt documentation built on May 2, 2019, 6:02 a.m.