isingibbs | 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\times 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.
isinghm
image(1:20,1:20,isingibbs(10,20,20,beta=0.3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.