pl_mrf2d {mrf2d} | R Documentation |
Pseudo-likelihood function for MRFs on 2d lattices
Description
Computes the pseudo-likelihood function of a Markov Random Field on a 2-dimensional lattice.
Usage
pl_mrf2d(Z, mrfi, theta, log_scale = TRUE)
Arguments
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 |
Details
The pseudo-likelihood function is defined as the product of conditional probabilities of each pixel given its neighbors:
\prod_i P(Z_i | Z_{{N}_i}, \theta).
Value
A numeric
with the pseudo-likelihood value.
Author(s)
Victor Freguglia
See Also
A paper with detailed description of the package can be found at doi: 10.18637/jss.v101.i08.
Examples
pl_mrf2d(Z_potts, mrfi(1), theta_potts)