GProcess {MCMChybridGP}R Documentation

Determine a Gaussian process fit to a multivariate log-density function.

Description

A function to determine a Gaussian process fit to a set of points forming a matrix X, given a column of corresponding values of the log-density of a target distribution. Returned is a (zero mean) approximation Ef of the log-density and various components of the Gaussian process fit as used by hybrid.explore and hybrid.sample.

Usage

GProcess(X, y, dsq_eta = NULL, request.functions = TRUE)

Arguments

X A matrix of at least 2 columns with rows representing the points (nodes) for the Gaussian process.
y A column of corresponding values of the log-density. Each entry corresponds to the log-density evaluated at the respective row in X.
dsq_eta Gaussian process parameters as used in hybrid.explore. (Optimal values will be determined when not supplied.)
request.functions Boolean argument (with default TRUE) to request the return of function approximations Ef (and sigmaf) of the log-density.

Value

Returned is a list as requested consisting of:

Ef Upon request, the Gaussian process (zero mean) approximation of the log-density function.
sigmaf Upon request, a function giving the Gaussian process approximation of the standard deviation with respect to the log-density for a given point.
Sigma Covariance matrix used in generating the Gaussian process fit.
Sigma.inv The inverse of the Covariance matrix.
inverseOK Boolean flag to indicate successful calculation of Sigma.inv.
X The original X matrix as supplied.
ystar The zero mean form of y as supplied.
dsq_eta Parameter values determined for the Gaussian process.

Author(s)

Mark James Fielding <stafmj@nus.edu.sg>

References

"Efficient MCMC schemes for Bayesian calibration of computer models", Fielding, Mark, Nott, David J. and Liong Shie-Yui (2009), in preparation.

See Also

hybrid.explore,

Examples

    mu1 <- c(-1, -1)
    mu2 <- c(+1, +1)
    sigma.sq <- 0.1225
    X <- matrix(c(-2,-1,0,-2,0,2,0,1,2, -2,-1,-2,0,0,0,2,1,2), ncol = 2)
    f <- function(x) {
        px <- 1/4/pi/sqrt(sigma.sq) * exp(-1/2/sigma.sq *
            sum((x - mu1)^2)) + 1/4/pi/sqrt(sigma.sq) *
            exp(-1/2/sigma.sq * sum((x - mu2)^2))
        return(log(px))
    }

    y <- rep(NA, 9)
    for(i in 1:9) y[i] <- f(X[i,])

    Ef <- GProcess(X, y, request.functions = TRUE)$Ef
    Ey <- NA*y
    for(i in 1:9) Ey[i] <- Ef(X[i,])
    data.frame(X, ystar=y-mean(y), Ey)
    ## Gaussian process close to exact at points supplied.


[Package MCMChybridGP version 2.2 Index]