adapt.concept2.sFFLHD.R6: Class providing object with methods for...

Description Format Value Methods Public fields Active bindings Methods Examples

Description

Class providing object with methods for adapt.concept2.sFFLHD.R6

Class providing object with methods for adapt.concept2.sFFLHD.R6

Format

R6Class object.

Value

Object of R6Class with methods for running an adaptive experiment.

Methods

Documentation

For full documentation of each method go to https://github.com/CollinErickson/DOE-Code

new(X, Z, corr="Gauss", verbose=0, separable=T, useC=F,useGrad=T, parallel=T, nug.est=T, ...)

This method is used to create object of this class with X and Z as the data.

update(Xnew=NULL, Znew=NULL, Xall=NULL, Zall=NULL, restarts = 5, param_update = T, nug.update = self$nug.est)

This method updates the model, adding new data if given, then running optimization again.

Public fields

X

Design matrix

Z

Responses

b

batch size

func

Actual function to get experiment values from

nb

Number of batches, if you know before starting

D

Dimension of data

Xopts

Available points

X0

Initial design

package

Which GP package to use in IGP

stats

List of tracked stats

iteration

Which iteration

mod

The GP model from

func_run_together

Whether points should be passed to func separately as vectors or all together as a matrix whose rows are the points.

func_fast

If the function is fast. If TRUE then full plots are made. In practice this is alway FALSE.

new_batches_per_batch

How many batches of candidate points are added for each batch taken.

X_tracker

data.frame tracking the points of X, such as when they were selected.

X0

An initial matrix of points to be used.

Xopts

A matrix of candidate (option) points.

Xopts_tracker

A data.frame tracking the points of Xopts.

batch.tracker

Tracks when points were added to Xopts.

Xopts_removed

A matrix of points removed from Xopts.

s

The design object for generating candidate points.

design

A string saying which design object should be used.

stats

A data.frame giving stats for each iteration.

iteration

The current iteration.

obj

A string saying what the objective is.

obj_func

A function for the objective.

n0

The initial number of points to be selected.

take_until_maxpvar_below

A number, if the proportion of points near the maximum variance of the GP model, then it will take space-filling points.

package

Which GP package should be used by IGP. You should stick with "laGP_GauPro_kernel", but could also use "laGP".

force_old

A number saying how often the oldest candidate points should be forced into the design.

force_pvar

A number saying how often the points with the highest predictive variance should be forced into the design.

des_func

The desirability function.

des_func_fast

Whether the des_func is fast for candidate points.

alpha_des

The alpha constant for the weight function.

actual_des_func

The true des func used to evaluate the model, not known in practice

weight_const

The weight constant in the weight function, usually 1.

selection_method

What the selection method should be.

parallel

Should new values be calculated in parallel?

verbose

How much detail should be printed to the console. 0 is minimal, 1 is medium, 2 is a lot.

Active bindings

nb

Number of batches, if you know before starting

Methods

Public methods


Method new()

Usage
adapt.concept2.sFFLHD.R6$new(
  D,
  L,
  b = NULL,
  package = "laGP_GauPro_kernel",
  obj = NULL,
  n0 = 0,
  stage1batches = NULL,
  force_old = 0,
  force_pvar = 0,
  useSMEDtheta = F,
  func,
  func_run_together = FALSE,
  func_fast = TRUE,
  take_until_maxpvar_below = NULL,
  design = "sFFLHD",
  selection_method,
  X0 = NULL,
  Xopts = NULL,
  des_func,
  des_func_fast = TRUE,
  alpha_des = 1,
  new_batches_per_batch = 5,
  parallel = FALSE,
  parallel_cores = "detect",
  nugget = 1e-06,
  estimate.nugget = TRUE,
  verbose = 1,
  design_seed = numeric(0),
  weight_const = 0,
  error_power = 2,
  nconsider = Inf,
  nconsider_random = 0,
  ...
)

Method run()

Usage
adapt.concept2.sFFLHD.R6$run(maxit, plotlastonly = F, noplot = F)

Method run1()

Usage
adapt.concept2.sFFLHD.R6$run1(plotit = TRUE)

Method add_data()

Usage
adapt.concept2.sFFLHD.R6$add_data()

Method update_obj_nu()

Usage
adapt.concept2.sFFLHD.R6$update_obj_nu(Xnew, Znew)

Method update_mod()

Usage
adapt.concept2.sFFLHD.R6$update_mod()

Method set_params()

Usage
adapt.concept2.sFFLHD.R6$set_params()

Method update_stats()

Usage
adapt.concept2.sFFLHD.R6$update_stats()

Method mse_func()

Usage
adapt.concept2.sFFLHD.R6$mse_func()

Method plot_mean()

Usage
adapt.concept2.sFFLHD.R6$plot_mean(cex = 1, plot.axes = TRUE)

Method plot_se()

Usage
adapt.concept2.sFFLHD.R6$plot_se(cex = 1, plot.axes = TRUE)

Method plot_abserr()

Usage
adapt.concept2.sFFLHD.R6$plot_abserr(cex = 1, plot.axes = TRUE)

Method plot_mse()

Usage
adapt.concept2.sFFLHD.R6$plot_mse(statsdf, cex = 1)

Method plot_iwe()

Usage
adapt.concept2.sFFLHD.R6$plot_iwe(statsdf, cex = 1)

Method plot_ppu()

Usage
adapt.concept2.sFFLHD.R6$plot_ppu(statsdf, cex)

Method plot_des_v_acc()

Usage
adapt.concept2.sFFLHD.R6$plot_des_v_acc(cex, cex.axis)

Method plot_y_acc()

Usage
adapt.concept2.sFFLHD.R6$plot_y_acc(residual = FALSE)

Method plot_1D()

Usage
adapt.concept2.sFFLHD.R6$plot_1D()

Method plot_2D()

Usage
adapt.concept2.sFFLHD.R6$plot_2D(twoplot = FALSE, cex = 1)

Method plot1()

Usage
adapt.concept2.sFFLHD.R6$plot1(twoplot = FALSE, cex = 1)

Method add_new_batches_to_Xopts()

Usage
adapt.concept2.sFFLHD.R6$add_new_batches_to_Xopts(
  num_batches_to_take = self$new_batches_per_batch
)

Method Xopts_tracker_add()

Usage
adapt.concept2.sFFLHD.R6$Xopts_tracker_add(Xnew)

Method Xopts_tracker_remove()

Usage
adapt.concept2.sFFLHD.R6$Xopts_tracker_remove(newL)

Method select_new_points_from_old_or_pvar()

Usage
adapt.concept2.sFFLHD.R6$select_new_points_from_old_or_pvar()

Method select_new_points_from_SMED()

Usage
adapt.concept2.sFFLHD.R6$select_new_points_from_SMED()

Method select_new_points_from_max_des()

Usage
adapt.concept2.sFFLHD.R6$select_new_points_from_max_des()

Method select_new_points_from_max_des_red()

Usage
adapt.concept2.sFFLHD.R6$select_new_points_from_max_des_red()

Method int_werror_after_adding()

Usage
adapt.concept2.sFFLHD.R6$int_werror_after_adding(
  Xnew = NULL,
  Znew = NULL,
  Xnew_Xoptsrow = NULL,
  n = 10000,
  int_points = NULL,
  seed = NULL,
  ...
)

Method add_newL_points_to_design()

Usage
adapt.concept2.sFFLHD.R6$add_newL_points_to_design(
  newL = NULL,
  use_X0 = FALSE,
  reason
)

Method calculate_Z()

Usage
adapt.concept2.sFFLHD.R6$calculate_Z(X)

Method weight_func()

Usage
adapt.concept2.sFFLHD.R6$weight_func(
  ...,
  XX,
  mod = self$mod,
  des_func = self$des_func,
  alpha = self$alpha_des,
  weight_const = self$weight_const
)

Method werror_func()

Usage
adapt.concept2.sFFLHD.R6$werror_func(
  ...,
  XX,
  mod = self$mod,
  des_func = self$des_func,
  alpha = self$alpha_des,
  weight_const = self$weight_const,
  weight_func = self$weight_func,
  error_power = self$error_power
)

Method intwerror_func()

Usage
adapt.concept2.sFFLHD.R6$intwerror_func(
  ...,
  XX = NULL,
  N = 10000,
  mod = self$mod,
  des_func = self$des_func,
  alpha = self$alpha_des,
  weight_const = self$weight_const,
  weight_func = self$weight_func,
  error_power = self$error_power
)

Method int_pvar_red_for_opts()

Usage
adapt.concept2.sFFLHD.R6$int_pvar_red_for_opts(
  ...,
  Xopts,
  XX = NULL,
  N = 10000,
  mod = self$mod,
  des_func = self$des_func,
  alpha = self$alpha_des,
  weight_const = self$weight_const,
  weight_func = self$weight_func,
  delta_pvar_func = mean
)

Method int_pvar_red_for_one()

Usage
adapt.concept2.sFFLHD.R6$int_pvar_red_for_one(
  v,
  X_,
  XX,
  corr_func,
  Kinv,
  s2,
  K_X_XX,
  delta_pvar_func = mean
)

Method actual_intwerror_func()

Usage
adapt.concept2.sFFLHD.R6$actual_intwerror_func(
  ...,
  N = 2000,
  mod = self$mod,
  f = self$func,
  error_power = self$error_power,
  nquantilegroups
)

Method print_results()

Usage
adapt.concept2.sFFLHD.R6$print_results()

Method delete()

Usage
adapt.concept2.sFFLHD.R6$delete()

Method clone()

The objects of this class are cloneable with this method.

Usage
adapt.concept2.sFFLHD.R6$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# wing weight, grad_norm2_mean, laGP_GauPro_kernel
set.seed(1)
a <- adapt.concept2.sFFLHD.R6$new(
  D=10,L=5,func=TestFunctions::wingweight, nugget = 1e-7,estimate.nugget = TRUE,
  obj="desirability", des_func=des_func_grad_norm2_mean,
  actual_des_func=NULL,#get_num_actual_des_func_grad_norm2_mean(),
  stage1batches=6, alpha_des=1, weight_const=0,
  package="laGP_GauPro_kernel", design='sFFLHD_Lflex',
  error_power=2,
  selection_method="max_des_red_all_best"
);
a$run(2)

CollinErickson/GradAdaptCompExp documentation built on Dec. 17, 2021, 3:02 p.m.