GProcess: Determine a Gaussian process fit to a multivariate...

Description Usage Arguments Value Author(s) References See Also Examples

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

1
GProcess(X, y, params = NULL, request.functions = TRUE, finetune = FALSE)

Arguments

X

A matrix of at least 2 columns with rows representing the points (nodes) for a Gaussian process fit.

y

A column of corresponding values of the log-density. Each entry corresponds to the log-density evaluated at the respective row in X.

params

Gaussian process parameters as used in hybrid.explore. (Optimal values are determined (starting from a supplied value).)

request.functions

Optional boolean argument (default TRUE) to request the return of function approximations Ef (and sigmaf) of the log-density.

finetune

Optional boolean argument (default FALSE) to determine fine-tuned optimal values in params.

Value

Returned is a list as requested consisting of:

Ef

The Gaussian process approximation of the log-density function.

sigmaf

Upon request, a function giving the Gaussian process approximation of the standard deviation with respect to y=f(x) for a given point.

Sigma

Covariance matrix used in 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.

y

y as supplied. (Note calculations use y-mean(y))

params

Parameter values for the Gaussian process fit.

Author(s)

Mark James Fielding <mark.fielding@gmx.com>

References

"Efficient MCMC Schemes for Computationally Expensive Posterior Distributions", Fielding, Nott and Liong (2011).

See Also

hybrid.explore,

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
    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, y, Ey)
    ## Gaussian process close to exact at points supplied.

MCMChybridGP documentation built on Nov. 13, 2020, 1:13 a.m.