Usage
simulPotts_cpp(W_SR, W_LR, sample, coords, site_order, rho, distance_ref, iter_max, cv_criterion, regional, verbose)
Arguments
W_SR
the local neighbourhood matrix. dgCMatrix. Should be normalized by row (i.e. rowSums(W_SR)=1
).
W_LR
the regional neighbourhood matrix. dgCMatrix. Should contain the categroy of distance.
sample
the initial observations (by rows) for the various groups (by columns). matrix.
coords
the voxels coordinates. matrix.
site_order
a specific order to go all over the sites. An integer vector or a negative number to indicate no specific order.
rho
a numeric corresponding to the Potts model parameter (i.e. intensity of the neighbourhood correlations).
distance_ref
the distance defining the several neighbourhood orders relatively to Wdist_LR
. numeric vector.
iter_max
the maximum number of iteration of the Gibbs sampler. integer.
cv_criterion
if the maximum absolute difference of the probabilistic membership between two iterations is below critere
then the Gibbs sampler is stopped. numeric.
regional
should the regional potential be computed ?. logical.
verbose
should the convergence criterion be printed at each step ? logical.