Description Usage Arguments Details Value Author(s) Examples

View source: R/integration_design_robinv.R

Constructing a set of integration and simulation points in robust inversion

1 2 | ```
integration_design_robinv(integcontrol = NULL, d = NULL, lower, upper,
opt.index, inv.index, model, T, min.prob = 0.001, seed = NULL)
``` |

`integcontrol` |
An important list with the following possible fields.
(I) If (II) The option |

`d` |
Dimension (i.e. number of scalar input variables) of the objective function. |

`lower` |
Array of size d. Lower bound of the input domain. |

`upper` |
Array of size d. Upper bound of the input domain. |

`opt.index` |
Array with integers corresponding to the indices of the nuisance parameters. |

`inv.index` |
Array with integers corresponding to the indices of the controlled parameters.
We must have |

`model` |
The current kriging model. km object. |

`T` |
Target threshold. |

`min.prob` |
Minimum probability for a candidate integration point to be picked. |

`seed` |
The random seed. For repeatability. |

(I) If the `"surnew"`

criterion is used, then the output is a list with
the following fields:

(i) inv.integration.points: n x dinv matrix containing the integration points.
n is the number of integration points and dinv the dimension of the space of controlled parameters.

(ii) integration.weights: array of size n containing the weights given to each integration points.

(iii) pn: array of size n containing the current excursion probabilities for each integration points. These
excursion probabilities are based on nsimu conditional Gaussian process simulations.

(iv) allsimu: p x (nsimu*n) matrix where p is the number of simulation points.
The first nsimu columns are the nsimu simulations in p points for the first integration point,
the next nsimu columns are linked to the next integration point and so on.

(v) allsimucentered: p x (nsimu*n) matrix containing the later simulations centered by
substracting the kriging mean of the points where the simulations are performed.

(vi) allsimupoints: (n*p) x d matrix containing all the points where simulations are performed.
The first p rows correspond to the simulation points linked to the first integration points, and so on.

(vii) allprecomp: a list with 3 fields obtained from a call to the function
`precomputeUpdateData`

on the points `allsimupoints`

. Help about `precomputeUpdateData`

is given in the KrigInv package.

(viii) allKn.inv: (n*p) x p matrix containing n different p x p matrices. Matrix number i is the inverse
of the p x p non-conditional covariance matrix of the p simulation points associated to the
integration point i.

(ix) allmn: n*p array with the kriging means of all n*p simulation points stored in `allsimupoints`

.

(II) If the `"sur"`

criterion is used, then the output is still a list, which however has different fields
than in (I):

(i) integration.points : (p*n) x d matrix containing all the simulation points. The first p points are
associated to the first integration point and so on.

(ii) cov: see description of the field allKn.inv (viii) in (I).

(iii) mean: see description of the field allmn (ix) in (I).

(iv) pn: array of size n containing the current excursion probabilities for each integration points.

Depeding on the fields in the `integcontrol`

list, the return is different.
See the description on the integcontrol argument and the details.

Clement Chevalier [email protected]

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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | ```
library(KrigInv)
myfun <- branin_robinv
d <- 3
set.seed(8)
n0 <- 30
T <- 10
opt.index <- c(3)
inv.index <- c(1,2)
lower <- rep(0,times=d)
upper <- rep(1,times=d)
design <- matrix(runif(d*n0),nrow=n0)
response <- myfun(design)
model <- km(formula = ~1,design = design,response = response,covtype = "matern3_2")
integcontrol <- list(distrib = "surnew",n.points = 20,finaldistrib="surnew",
n.candidates=50,nsimu=1000,n.optpoints = 50,
choose_optpoints=TRUE,n.optpoints.candidates=500)
## Not run:
obj <- integration_design_robinv(integcontrol = integcontrol,d=d,lower=lower,upper=upper,
opt.index=opt.index,inv.index=inv.index,model=model,T=T)
## End(Not run)
#####################################
# An example with scaling
library(KrigInv)
myfun <- function(x){ return(-1*branin_robinv(x) - 50*sin(min(100,1/x[3])) ) }
d <- 3
set.seed(8)
n0 <- 60
T <- 30
opt.index <- c(3)
inv.index <- c(1,2)
lower <- rep(0,times=d)
upper <- rep(1,times=d)
design <- matrix(runif(d*n0),nrow=n0)
response <- apply(X = design,FUN = myfun,MARGIN = 1)
knots.number <- c(0,0,3)
knots <- generate_knots(knots.number = knots.number , d = d)
model <- km(formula = ~1,design = design,response = response,covtype = "matern3_2",scaling = TRUE,knots=knots)
integcontrol <- list(distrib = "surnew",n.points = 20,finaldistrib="surnew",
n.candidates=200,nsimu=100,n.optpoints = 50,
choose_optpoints=TRUE,n.optpoints.candidates=500,
unscale.opt.simulation.points=TRUE)
## Not run:
obj <- integration_design_robinv(integcontrol = integcontrol,d=d,lower=lower,upper=upper,
opt.index=opt.index,inv.index=inv.index,model=model,T=T)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.