Skip to main content
. Author manuscript; available in PMC: 2016 Apr 29.
Published in final edited form as: Ann Appl Stat. 2015 Nov 2;9(3):1571–1600. doi: 10.1214/15-AOAS844

Algorithm 2.

HMRF parameter estimation

1. Initialize the states of node Ii = 1if Zi > Zthres and 0 otherwise.
2. For t = 1, . . ., T
    (a) Update ((t), ĉ(t)) by maximizing the pseudo likelihood
iexp{bIi+cIiΩi.I}exp{bIi+cIiΩi.I}+exp{b(1Ii)+c(1Ii)Ωi.I}.
    (b) Apply a single cycle of the iterative conditional mode [ICM, Besag (1986)] algorithm to update I. Specifically, we obtain a new I^j(t) based on
P(IjZ;I^i,b^(t),c^(t))f(ziI^i)P(IiI^i,b^(t),c^(t)).
    (c) Update (μ^(t1),σ^02(t1),σ^12(t1)) to (μ^(t),σ^02(t),σ^12(t)):
μ^(t)=iP(Ii=1Z,b^(t);c^(t))ZiiP(Ii=1Z,b^(t);c^(t)),
σ^02(t)=iP(Ii=0Z,b^(t);c^(t))Zi2iP(Ii=0Z,b^(t);c^(t)),
σ^12(t)=iP(Ii=1Z,b^(t);c^(t))(Ziμ^(t))2iP(Ii=1Z,b^(t);c^(t)).
3. Return (b^,c^,μ^,σ^02,σ^12)=(b^(T),c^(T),μ^(T),σ^02(T),σ^12(T)).