CGGP (version 1.0.4)

CGGPappend: Add points to CGGP

Description

Add `batchsize` points to `SG` using `theta`.

Usage

CGGPappend(CGGP, batchsize, selectionmethod = "MAP")

Value

SG with new points added.

Arguments

CGGP

Sparse grid object

batchsize

Number of points to add

selectionmethod

How points will be selected: one of `UCB`, `TS`, `MAP`, `Oldest`, `Random`, or `Lowest`. `UCB` uses Upper Confidence Bound estimates for the parameters. `TS` uses Thompson sampling, a random sample from the posterior. `MAP` uses maximum a posteriori parameter estimates. `Oldest` adds the block that has been available the longest. `Random` adds a random block. `Lowest` adds the block with the lowest sum of index levels. `UCB` and `TS` are based on bandit algorithms and account for uncertainty in the parameter estimates, but are the slowest. `MAP` is fast but doesn't account for parameter uncertainty. The other three are naive methods that are not adaptive and won't perform well.

See Also

Other CGGP core functions: CGGPcreate(), CGGPfit(), predict.CGGP()

Examples

Run this code
SG <- CGGPcreate(d=3, batchsize=100)
y <- apply(SG$design, 1, function(x){x[1]+x[2]^2})
SG <- CGGPfit(SG, Y=y)
SG <- CGGPappend(CGGP=SG, batchsize=20, selectionmethod="MAP")

Run the code above in your browser using DataLab