hybrid.explore: Exploratory phase to determine points used for a Gaussian...

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

Description

The Exploratory phase of hybrid MCMC using a Gaussian process approximation of derivatives. The user must provide the log-density of a target distribution and a small set of (say 10) points forming the matrix X0. Using a Gaussian process approximation, points are added until a appropriate set of points are determined for a final Gaussian process fit to the target distribution. Results can then be passed to the Sampling phase or the Gaussian process approximation Ef can be used to approximate f.

Usage

1
2
3
4
hybrid.explore(f, X0, ..., y0 = NULL, n = 200, L = 1000, delta = 0.003,
                 nchains = 5, T.mult = 1.5, lb = NULL, ub = NULL,
                 maxleap=0.95, finetune = FALSE, Tinclude = nchains,
                 nswaps = choose(nchains, 2), graph = FALSE)

Arguments

f

A function giving the log-density of the target distribution.

X0

A matrix with rows giving say 10 points for an initial Gaussian process fit.

...

Further arguments to be passed to f.

y0

Corresponding function values if already known. Otherwise the corresponding function values will first be evaluated.

n

An optional integer argument. The number of points to be generated for the final Gaussian process fit.

L

An optional integer argument. The number of steps to be used in Leapfrog moves in MCMC proposals.

delta

An optional numeric argument (default 0.003). The size of Leapfrog steps to be made, with a suitable balance between L and delta.

nchains

An optional integer argument. The number of Parallel Tempering chains to be used (default 5).

T.mult

An optional numeric argument. The Temperature multiple to be used in Parallel Tempering (default 1.5).

lb

An optional numeric argument. Lower bounds placed on X. Only points within bounds are included in Gaussian process fit.

ub

An optional numeric argument. Upper bounds placed on X. Only points within bounds are included in Gaussian process fit.

maxleap

An optional numeric 0-1 argument (default 0.95). Used in early stops in Leapfrog moves. The Leapfrog is stopped when the standard deviation of f(x) exceeds an appropriate corresponding value.

finetune

An optional boolean argument (default FALSE). Option for fine-tuning Gaussian process parameters. This may be useful when a good fit is difficult to achieve.

Tinclude

An optional integer argument (default nchains). Limit the number of temperatures to contribute points to the Gaussian process fit. With low acceptance rates for T=1, Tinclude=1 might be used. Otherwise a larger value gives a faster explore phase.

nswaps

An optional integer argument. The number of repetitions of proposed swaps between the parallel chains.

graph

An optional boolean argument (default FALSE). To request a graphical display of progress during the explore phase.

Details

The method used in hybrid.explore is described in Fielding, Nott and Liong (2011).

Value

A list is returned to be used as input to hybrid.sample.

X

A matrix made up of the set of points used in the final Gaussian process fit.

y

A column of the corresponding evaluations of f.

f

The original log-density function supplied.

maxleap

The value of maxleap as default or supplied.

function.calls

The number of function calls used to evaluate f.

details

A list containing information particular to hybrid.sample.

GPfit

Ouput from GProcess with the final Gaussian process fit and in particular the (zero mean) approximation Ef.

Note

The methods used in hybrid.explore and hybrid.sample give extensions to the work of Rasmussen (2003), as described in Fielding, Nott and Liong (2011).

For very low acceptance rates, points included at later stages are likely to be more useful with a fit only deteriorated by the earlier points. In such a case a second run of hybrid.explore might be useful, taking values for X0 and y0 as those output for X and y from the first run.

Author(s)

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

References

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

See Also

hybrid.sample, GProcess, generateX0.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
    mu1 <- c(-1, -1)
    mu2 <- c(+1, +1)
    sigma.sq <- 0.16
    ub <- c(1.5, 3)
    X0 <- matrix(c(-2,-1, 0,-2, 0, 1, 0, 1, 1,
                   -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))
    }


    explore.out <- hybrid.explore(f, X0, ub=ub, n=150, graph=TRUE)
    sample.out <- hybrid.sample(explore.out, n=500, graph=TRUE)

    opar <- par(mfrow=c(2,1))
    plot(density(sample.out$SAMP[,1]), xlab="x1", ylab="f(x)")
    plot(density(sample.out$SAMP[,2]), xlab="x2", ylab="f(x)")
    par(opar)

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