CGGPappend: Add points to CGGP

View source: R/CGGP_append_fs.R

CGGPappendR Documentation

Add points to CGGP


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


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



Sparse grid object


Number of points to add


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.


SG with new points added.

See Also

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


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")

CollinErickson/CGGP documentation built on Feb. 6, 2024, 2:24 a.m.