Learn R Programming

GPareto (version 1.1.8)

plot_uncertainty: Plot uncertainty

Description

Displays the probability of non-domination in the variable space. In dimension larger than two, projections in 2D subspaces are displayed.

Usage

plot_uncertainty(
  model,
  paretoFront = NULL,
  type = "pn",
  lower,
  upper,
  resolution = 51,
  option = "mean",
  nintegpoints = 400
)

Arguments

model

list of objects of class km, one for each objective functions,

paretoFront

(optional) matrix corresponding to the Pareto front of size [n.pareto x n.obj],

type

type of uncertainty, for now only the probability of improvement over the Pareto front,

lower

vector of lower bounds for the variables,

upper

vector of upper bounds for the variables,

resolution

grid size (the total number of points is resolution^d),

option

optional argument (string) for n > 2 variables to define the projection type. The 3 possible values are "mean" (default), "max" and "min",

nintegpoints

number of integration points for computation of mean, max and min values.

Details

Function inspired by the function print_uncertainty and print_uncertainty_nd from the package KrigInv-package. Non-dominated observations are represented with green diamonds, dominated ones by yellow triangles.

Examples

Run this code
if (FALSE) { 
#---------------------------------------------------------------------------
# 2D, bi-objective function
#---------------------------------------------------------------------------
set.seed(25468)
n_var <- 2 
fname <- P1
lower <- rep(0, n_var)
upper <- rep(1, n_var)
res1 <- easyGParetoptim(fn=fname, lower=lower, upper=upper, budget=15, 
control=list(method="EHI", inneroptim="pso", maxit=20))

plot_uncertainty(res1$model, lower = lower, upper = upper)

#---------------------------------------------------------------------------
# 4D, bi-objective function
#---------------------------------------------------------------------------
set.seed(25468)
n_var <- 4
fname <- DTLZ2
lower <- rep(0, n_var)
upper <- rep(1, n_var)
res <- easyGParetoptim(fn=fname, lower=lower, upper=upper, budget = 40, 
control=list(method="EHI", inneroptim="pso", maxit=40))

plot_uncertainty(res$model, lower = lower, upper = upper, resolution = 31)
} 

Run the code above in your browser using DataLab