Learn R Programming

MRIaggr (version 1.1.5)

calcPottsParameter: Estimation of the local regularization parameters

Description

Estimation of the local regularization parameters using mean field approximation or a likelihood free method.

Usage

calcPottsParameter(Y, W_SR, coords = NULL, range = NULL, method = "MF", verbose = 3, ...)

Arguments

Y
a matrix containing the observations (by rows) for the various groups (by columns). REQUIRED.
W_SR
the local neighbourhood matrix. dgCMatrix. Should be normalized by row (i.e. rowSums(W_SR)=1). REQUIRED.
coords
if argument W_SR is not specified, the coordinates of the sites used to compute the local neighbourhood matrix. data.frame.
range
if argument W_SR is not specified, the range of the neighbourhood used to compute the local neighbourhood matrix. positive double.
method
the method used to estimate the regularization parameter. Can be either "MF" or "Lvfree".
verbose
should the execution of the function be be traced ? Can be 0, 1, 2 or 3.
...
additional arguments to be passed to the function called by calcPottsParameter to perform the estimation. See the arguments of link{rhoMF} or link{rhoLvfree}.

Details

FUNCTION: This function call either rhoMF if argument method is "MF" or rhoLvfree if argument method is "Lvfree". Estimation of the regional regularization parameter is only available with mean field approximation (method="MF"). The likelihood free estimation (Pereyra et al, 2013) should give a more accurate estimation despite a higher computational cost.

References

M. Pereyra, N. Dobigeon, H. Batatia, and J.Y. Tourneret. Estimation the granularity coefficient of a Potts-Markov random field within an MCMC algorithm. IEEE Trans. Image Porcessing, 22(6):2385-2397, 2013.

See Also

calcW to compute the neighbourhood matrix, simulPotts to simulate from a Potts model.

Examples

Run this code
# spatial field
## Not run: 
# n <- 50
# ## End(Not run)

G <- 3
coords <- as.data.frame(which(matrix(0, nrow = n * G, ncol = n * G) == 0, arr.ind = TRUE))

# neighbourhood matrix
resW <- calcW(as.data.frame(coords), range = sqrt(2), row.norm = TRUE, calcBlockW = TRUE)
W_SR <- resW$W
site_order <- unlist(resW$blocks$ls_groups) - 1

# initialisation
set.seed(10)
sample <- simulPotts(W_SR, G = 3, rho = 3.5, iter_max = 500, 
                     site_order = site_order)$simulation

#### estimation using the neighbourhood matrix
rho_MF <- calcPottsParameter(Y = sample, W_SR = W_SR,  method = "MF")

## Not run: 
# rho_Lvfree <- calcPottsParameter(Y = sample, W_SR = W_SR, 
#                                 site_order = site_order, method = "Lvfree", verbose = 2)
# ## End(Not run)

#### estimation using the coordinates
rho_MF <- calcPottsParameter(Y = sample, coords = coords, range = sqrt(2), method = "MF")

## Not run: 
# rho_Lvfree <- calcPottsParameter(Y = sample, coords = coords, range = sqrt(2),
#                                 site_order = site_order, method = "Lvfree", verbose = 2)
# ## End(Not run)

Run the code above in your browser using DataLab