dist.ContinuousRelaxation: Continuous Relaxation of a Markov Random Field Distribution

Description Usage Arguments Details Value References See Also Examples

Description

This is the density function and random generation from the continuous relaxation of a Markov random field (MRF) distribution.

Usage

1
2
dcrmrf(x, alpha, Omega, log=FALSE)
rcrmrf(n, alpha, Omega)

Arguments

x

This is a vector of length k.

n

This is the number of random deviates to generate.

alpha

This is a vector of length k of shape parameters.

Omega

This is the k x k precision matrix Omega.

log

Logical. If log=TRUE, then the logarithm of the density is returned.

Details

It is often easier to solve or optimize a problem with continuous variables rather than a problem that involves discrete variables. A continuous variable may also have a gradient, contour, and curvature that may be useful for optimization or sampling. Continuous MCMC samplers are far more common.

Zhang et al. (2012) introduced a generalized form of the Gaussian integral trick from statistical physics to transform a discrete variable so that it may be estimated with continuous variables. An auxiliary Gaussian variable is added to a discrete Markov random field (MRF) so that discrete dependencies cancel out, allowing the discrete variable to be summed away, and leaving a continuous problem. The resulting continuous representation of the problem allows the model to be updated with a continuous MCMC sampler, and may benefit from a MCMC sampler that uses derivatives. Another advantage of continuous MCMC is that stationarity of discrete Markov chains is problematic to assess.

A disadvantage of solving a discrete problem with continuous parameters is that the continuous solution requires more parameters.

Value

dcrmrf gives the density and rcrmrf generates random deviates.

References

Zhang, Y., Ghahramani, Z., Storkey, A.J., and Sutton, C.A. (2012). "Continuous Relaxations for Discrete Hamiltonian Monte Carlo". Advances in Neural Information Processing Systems, 25, p. 3203–3211.

See Also

dmvn

Examples

1
2
3
library(LaplacesDemon)
x <- dcrmrf(rnorm(5), rnorm(5), diag(5))
x <- rcrmrf(10, rnorm(5), diag(5))

LaplacesDemon documentation built on July 9, 2021, 5:07 p.m.