| pottsgibbs | R Documentation |
This function produces one simulation of a square numb by numb grid
from a Potts distribution with four colours and a four neighbour
structure, relying on niter iterations of a standard Gibbs sampler.
pottsgibbs(niter, numb, beta)
niter |
number of Gibbs iterations |
numb |
size of the square grid |
beta |
parameter of the Potts model |
returns a random realisation from the Potts model
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.
pottshm
ex=pottsgibbs(100,15,.4)
image(ex)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.