Description Usage Arguments Details Value References See Also Examples

`sim.dpp.modal.fast.seq()`

is similar to `sim.dpp.modal.fast`

but sequentially selects `n`

additional points to
add to the design given that the points in `curpts`

are alread in the design from previous sequential
iterations.
It uses the C++ codepath that makes use of
SPAM's sparse matrices to enable faster computation. It implements the DPP-based design
emulator of Pratola et al. (2018) to draw a sequential sample of the `n`

-run additional optimal design points for a Gaussian
process regression model with compact correlation function *r(x,x^\prime)*, where the entries
of `R`

are formed by evaluating *r(x,x^\prime)* over a grid of candidate locations.

1 | ```
sim.dpp.modal.fast.seq(curpts, R,n)
``` |

`curpts` |
A vector of indices to the candidate points that already appear in the design. |

`R` |
A sparse correlation matrix evaluated over a grid of candidate design sites. The sparse matrix should be of type |

`n` |
Size of the design to sample. |

For more details on the method, see Pratola et al. (2018). Detailed examples demonstrating the method are available at http://www.matthewpratola.com/software.

A vector of indices to the sampled design sites.

Pratola, Matthew T., Lin, C. Devon, and Craigmile, Peter. (2018)
Optimal Design Emulators: A Point Process Approach.
*arXiv:1804.02089*.

`demu-package`

`sim.dpp.modal.fast`

`sim.dpp.modal`

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 | ```
library(demu)
library(fields)
library(spam)
library(Matrix)
n1=3
n2=3
n3=3
rho=0.2
ngrid=10
x=seq(0,1,length=ngrid)
X=as.matrix(expand.grid(x,x))
l.d=makedistlist(X)
# Initial design
R.spam=wendland.cov(X,X,theta=rho,k=3)
R=as.dgCMatrix.spam(R.spam)
pts.1=sim.dpp.modal.fast(R,n1)
pts.1.proj=remove.projections(pts.1,X)
# Next sequential step, removing projections
pts.2=sim.dpp.modal.fast.seq(pts.1.proj$allpts,R,n2)
design=c(pts.1,pts.2$pts.new)
pts.2.proj=remove.projections(design,X)
# Next sequential step, removing projections
pts.3=sim.dpp.modal.fast.seq(pts.2.proj$allpts,R,n3)
design=c(design,pts.3$pts.new)
# Or, starting with the initial design, don't remove projections
pts.2=sim.dpp.modal.fast.seq(pts.1,R,n2)
designB=c(pts.1,pts.2$pts.new)
pts.3=sim.dpp.modal.fast.seq(designB,R,n3)
designB=c(designB,pts.3$pts.new)
# Plot the result:
#par(mfrow=c(1,3))
#plot(X,xlim=c(0,1),ylim=c(0,1),main="Initial Design")
#points(X[pts.1,],pch=20,cex=2)
#
#plot(X,xlim=c(0,1),ylim=c(0,1),main="+3x2 remove projections")
#points(X[design,],pch=20,cex=2)
#
#plot(X,xlim=c(0,1),ylim=c(0,1),main="+3x2 not removing projections")
#points(X[designB,],pch=20,cex=2)
``` |

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.