View source: R/batchDesign_utils.R
plt.2d.surf.with.batch | R Documentation |
two-dimensional image+contour plot with replication counts for an osp.seq.batch.design
fit
plt.2d.surf.with.batch(
fit,
batch_size,
x = seq(25, 50, len = 201),
y = seq(25, 50, len = 201),
contour.col = "red",
rep.limits = c(20, 100)
)
fit |
An emulator object. Can be any of the types supported by |
batch_size |
array of replication counts for each input generated by |
x, y |
locations to use for the |
contour.col |
(default is "red") – color of the zero contour |
rep.limits |
(default is c(20,100)) – range of the legend for the replication counts |
Xiong Lyu
sob30 <- randtoolbox::sobol(55, d=2) # construct a space-filling initial design
sob30 <- sob30[ which( sob30[,1] + sob30[,2] <= 1) ,]
sob30 <- 25+30*sob30
model2d <- list(x0 = rep(40,2),K=40,sigma=rep(0.2,2),r=0.06,
div=0,T=1,dt=0.04,dim=2,sim.func=sim.gbm,
payoff.func=put.payoff, look.ahead=1, pilot.nsims=1000,
cand.len=1000,max.lengthscale=c(40,40),min.lengthscale=c(3,3),
seq.design.size=50,batch.nrep=25,total.budget=1000,init.size=30,
init.grid=sob30, kernel.family="gauss",update.freq=5,
r.cand=c(20, 30,40,50,60, 80, 120, 160))
set.seed(11)
require(tgp)
require(DiceKriging)
require(laGP)
require(ks)
require(RColorBrewer)
require(scales)
model2d$batch.heuristic <- 'adsa'
model2d$ei.func <- 'amcu'
oos.obj.adsa <- osp.seq.batch.design(model2d,method="trainkm")
plt.2d.surf.with.batch(oos.obj.adsa$fit[[15]],
oos.obj.adsa$batches[1:oos.obj.adsa$ndesigns[15] - 1, 15])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.