C++ function that simulates an isotropic Potts model by Gibbs sampling. Experimental.
1 2 | simulPotts_cpp(W_SR, W_LR, sample, coords, site_order, rho,
distance_ref, iter_max, cv_criterion, regional, verbose)
|
W_SR |
the local neighbourhood matrix. dgCMatrix. Should be normalized by row (i.e. |
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 |
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 |
regional |
should the regional potential be computed ?. logical. |
verbose |
should the convergence criterion be printed at each step ? logical. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.