It turns out I should have read Renfrey B. Potts’ 1952 paper more carefully, since equation (9) gives the general form of $\beta_{\textrm{critical}}$ for a regular 2D lattice, where $r$ is the number of unique configurations:

$\log(1 + \sqrt{r})$

Marin & Robert (2007; sect. 8.3) applied the hidden Potts model to a satellite image of Lake Menteith, in Scotland ($56^{\circ}10'36"N \;\;\; 4^{\circ}17'39"W$):

lm3 <- as.matrix(read.table("Menteith"))
y <- as.vector(lm3)
image(1:100,1:100,t(lm3[100:1,]),col=gray(256:1/256),xlab="",ylab="",main="Lake of Menteith")


Where $r=6$, $\beta_{crit} = \log(1 + \sqrt{6}) = 1.238226\dots$

library(PottsUtils)
library(bayesImageS)

k <- 6
bcrit <- log(1 + sqrt(k))
beta <- seq(0,3.5,by=0.1)
counts <- matrix(0,length(beta),1000)
neigh <- getNeighbors(matrix(1,100,100), c(2,2,0,0))
block <- getBlocks(matrix(1,100,100), 2)
for (i in 1:length(beta)) {
result <- mcmcPottsNoData(beta[i],k,neigh,block,11000)
counts[i,] <- result\$sum[10001:11000]
}
x <- rep(beta,each=1000)
y <- as.vector(t(counts))
plot(x,y,xlab=expression(beta),ylab="identical neighbours",main=paste0("Critical temperature of the 2D Potts model, k=",k))
abline(v=2/bcrit,col="red")
abline(v=bcrit,col="blue")


The phase transition at the critical point (the blue line) is more pronounced than in my last post, for k=2. As noted by Marin & Robert, for β>2 all of the pixels are given the same label. The slight variability beyond that point is due to very slow mixing of the MCMC samples at those temperatures. I might try using the Swendsen-Wang algorithm instead, to see if that produces a clearer picture.

## References

Marin J M & Robert C P (2007) Bayesian Core: A Practical Approach to Computational Bayesian Statistics Springer-Verlag: New York

Potts R B (1952) Some generalized order-disorder transformations. Proc. Camb. Phil. Soc. 48 106

Swendsen R H & Wang J (1987) Nonuniversal critical dynamics in Monte Carlo simulations Phys. Rev. Lett. 58(2): 86–88

From → R

One Comment

1. Interactive image stacks in R | Matt Moores
Let's Look at the Figures

David Firth's blog

Nicholas Tierney

Computational Bayesian statistics

One weiRd tip

Computational Bayesian statistics

Series B'log

discussion blog for JRSS Series B papers

Musings, useful code etc. on R and data science

R-bloggers

R news and tutorials contributed by (750) R bloggers

Another Astrostatistics Blog

The random musings of a reformed astronomer ...

Darren Wilkinson's research blog

Statistics, computing, data science, Bayes, stochastic modelling, systems biology and bioinformatics

CHANCE

Computational Bayesian statistics

StatsLife - Significance magazine

Computational Bayesian statistics

Computational Bayesian statistics

Igor's Blog

Computational Bayesian statistics

Statisfaction

I can't get no

Xi'an's Og

an attempt at bloggin, nothing more...

Sam Clifford

Postdoctoral Fellow, Bayesian Statistics, Aerosol Science

Bayesian Research & Applications Group

Frontier Research in Bayesian Methodology & Computation