Description Usage Arguments Details References See Also Examples
Estimation of the local regularization parameters using mean field approximation or a likelihood free method.
1 | calcPottsParameter(Y, W_SR, coords = NULL, range = NULL, method = "MF", verbose = 3, ...)
|
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. |
coords |
if argument |
range |
if argument |
method |
the method used to estimate the regularization parameter. Can be either |
verbose |
should the execution of the function be be traced ? Can be |
... |
additional arguments to be passed to the function called by |
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.
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.
calcW
to compute the neighbourhood matrix,
simulPotts
to simulate from a Potts model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.