penlrm is designed to generate extra data and estimate its values piecewise linear. Its is often used as a penalty that penalizes high surrogate model oscillations.

penlrm

Format

An R6Class generator object

Details

Construct data points within some simplices of the design od ecperiments and evaluate a sm object with regards to the descrepency between its prediction and the generated data

Fields

Xpen

the witness data generated to perform comparison

Ypen

the piecewise linear estimation

Methods

penlrm$new(x,y)

Creates a new penlrm. Often used to construct the penalty measure and generate its data.

get_val(surrogate_model)

It evaluates the penalty for a surrogate_model (object sm).

get_err(surrogate_model)

It evaluates the errors of a surrogate model (object sm).

Examples

library(UP) X <- matrix(1:40,20,2) Y <- runif(20) pen <- penlrm$new(X, Y) 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)) lrmval <- pen$get_val(upsm) print("val_lrm")
#> [1] "val_lrm"
print(lrmval)
#> [1] 87158.08