custom_fit
custom_fit
is designed to estimate the quality of a surrogate
custom_fit
An R6Class
generator object
custom fit enable linear combination of several criteria
listComp
List of component
dcoeff
Coefficient of each term fitness
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
).
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)#> Warning: some row.names duplicated: 20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,43,45,48,49,51,53,55,58,59,60,61,62,63,64,65,66,67,68,71,72,73,75 --> row.names NOT usedprint("PPS")#> [1] "PPS"print(valPPS)#> [1] 187.1586