Description Usage Arguments Value Examples
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.
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,
...
)
|
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 |
tgdim |
integer |
ylast |
integer, if a positive integer is defined, observations from the last |
sto |
boolean |
... |
matrix with recommended points (process parameters for future measurements) in each line
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.