View source: R/pseudo_likelihood.R
pl_mrf2d | R Documentation |
Computes the pseudo-likelihood function of a Markov Random Field on a 2-dimensional lattice.
pl_mrf2d(Z, mrfi, theta, log_scale = TRUE)
Z |
A |
mrfi |
A |
theta |
A 3-dimensional array describing potentials. Slices represent
interacting positions, rows represent pixel values and columns represent
neighbor values. As an example: |
log_scale |
A |
The pseudo-likelihood function is defined as the product of conditional probabilities of each pixel given its neighbors:
∏_i P(Z_i | Z_{{N}_i}, θ).
A numeric
with the pseudo-likelihood value.
Victor Freguglia
A paper with detailed description of the package can be found at doi: 10.18637/jss.v101.i08.
pl_mrf2d(Z_potts, mrfi(1), theta_potts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.