custom_fit: Create a fitness class with 'custom_fit'

Description Usage Format Details Fields Methods Examples

Description

custom_fit is designed to estimate the quality of a surrogate

Usage

1

Format

An R6Class generator object

Details

custom fit enable linear combination of several criteria

Fields

listComp

List of component

dcoeff

Coefficient of each term fitness

Methods

custom_fit$new(coeff, components)

Creates a new custom_fit. Used to construct an assesment of a quality of a surrogate model

get_val(surrogate_model)

It gives an evaluation of a surrogate model (object sm).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(UP)
d              <- 2
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))
listCrit       <- list()
listCrit[[1]]  <- MSE$new() 
listCrit[[2]]  <- Resampling_Error$new() 
listCrit[[3]]  <- penlrm$new(X, y)
PPS            <- custom_fit$new(c(4,2,1), listCrit)
valPPS         <- PPS$get_val(upsm)
print("PPS")
print(valPPS)

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