sim.dpp.modal.fast: Draw samples from the conditional DPP design emulator.

Description Usage Arguments Details Value References See Also Examples

View source: R/simdpp.r

Description

sim.dpp.modal.fast() is similar to sim.dpp.modal but is a 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 sample of the n-run optimal design 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.

Usage

1

Arguments

R

A sparse correlation matrix evaluated over a grid of candidate design sites. The sparse matrix should be of type dgCMatrix (see package spam).

n

Size of the design to sample.

Details

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

Value

A vector of indices to the sampled design sites.

References

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

See Also

demu-package sim.dpp.modal sim.dpp.modal.seq

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
library(demu)
library(fields)
library(spam)
library(Matrix)
library(Rcpp)

# candidate grid
ngrid=20
x=seq(0,1,length=ngrid)
X=as.matrix(expand.grid(x,x))

# draw design from DPP mode
n=21
theta=0.39
R.spam=wendland.cov(X,X,theta=theta,k=3) 
R=as.dgCMatrix.spam(R.spam)
rm(R.spam)
pts=sim.dpp.modal.fast(R,n)

# Could plot the result:
# plot(X,xlim=c(0,1),ylim=c(0,1))
# points(X[pts,],pch=20)

demu documentation built on Jan. 13, 2020, 5:06 p.m.