isingibbs {bayess} | R Documentation |
This is the original Geman and Geman (1984) Gibbs sampler on the Ising model that gave its name to the method. It simulates an n*m grid from the Ising distribution.
isingibbs(niter, n, m=n, beta)
niter |
number of iterations of the algorithm |
n |
number of rows in the grid |
m |
number of columns in the grid |
beta |
Ising parameter |
x
, a realisation from the Ising distribution
as a matrix of size n
x m
Geman, S. and Geman, D. (1984) Stochastic relaxation, Gibbs distributions and the Bayesian restoration of images. IEEE Trans. Pattern Anal. Mach. Intell., 6, 721–741.
image(1:20,1:20,isingibbs(10,20,20,beta=0.3))