opt.onestep: opt.onestep

Description Usage Arguments Value Examples

View source: R/mvTargetOpt.R

Description

Performs one iteration of the implemented optimization procedure. Suggest points for future measurements in order to find a solution that reaches the desired target value. One or more suggested points are returned.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
opt.onestep(
  dat,
  tgmean,
  tgerr = NULL,
  xeps = 0.001,
  pcnr,
  maxarea = NULL,
  ptchoice = 1,
  useweights = TRUE,
  mknormweights = F,
  allpts = F,
  gr2retlimit = TRUE,
  bpcenter = F,
  mindeg = 0,
  wfun = function(x) {     (1/x)^2 },
  sequential = F,
  ptchng = F,
  nptc = 0,
  tgpcawg = 1,
  betterweights = F,
  yweights = F,
  datlim = NULL,
  knearest = NULL,
  tgdim = 1,
  ylast = NULL,
  sto = T,
  ...
)

Arguments

dat

data.frame, data set

tgmean

numerig vector, target mean

tgerr

NULL or numeric vector, maximally accepted deviation from target value

xeps

numeric, smallest delta

pcnr

integer vector, numbers the principal components that shall be considered

maxarea

matrix or NULL, maximal area that can/should be explored

ptchoice

integer

useweights

boolean

mknormweights

boolean

allpts

boolean

gr2retlimit

boolean

bpcenter

boolean

mindeg

integer, minimal degree for polynomial mdel

wfun

function, weight function

sequential

boolean

ptchng

boolean

nptc

integer

tgpcawg

numeric

betterweights

boolean

yweights

boolean

datlim

integer or NULL

knearest

integer, if specified only the knearest nearest observations to the target value are considered

tgdim

integer

ylast

integer, if a positive integer is defined, observations from the last ylast iterations are used only

sto

boolean

...

Value

matrix with recommended points (process parameters for future measurements) in each line

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(mvTargetOpt)
# Let there be the following true model tfoo:
tfoo <- function(x) {
  x1 <- x[,1]
  x2 <- x[,2]
  return( data.frame(y1=0.8*x1 - 1.2*x2,
                     y2=0.8*x1 - 1.2*abs(x2)^0.25) )
}
# assume we have measurements dat taken at startx:
startx <- expand.grid(x1=c(0,6,7,8,9,10,11,12),x2=c(-1,3,4,5,6,7))
dat <- cbind(startx,tfoo(startx))
# assume we want to find process parameters close to tgmean
tgmean <- tfoo(cbind(0.35,0.4))
# make a guess for a solution based on the specified parameters:
opt.onestep(dat, tgmean=tgmean,tgerr=c(0.2,0.2), pcnr=1:2)

amaendle/mvTargetOpt documentation built on June 12, 2020, 5:57 p.m.