penlrm: Create a penalty class with 'penlrm'

Description Usage Format Details Fields Methods Examples

Description

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.

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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")
print(lrmval)

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