pl_mrf2d: Pseudo-likelihood function for MRFs on 2d lattices

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/pseudo_likelihood.R

Description

Computes the pseudo-likelihood function of a Markov Random Field on a 2-dimensional lattice.

Usage

1
pl_mrf2d(Z, mrfi, theta, log_scale = TRUE)

Arguments

Z

A matrix with integers in {0,...,C}.

mrfi

A mrfi object representing the interaction structure.

theta

A 3-dimensional array describing potentials. Slices represent interacting positions, rows represent pixel values and columns represent neighbor values. As an example: theta[1,3,2] has the potential for the pair of values 0,2 observed in the second relative position of mrfi.

log_scale

A logical value indicating whether the returned value should be in logarithmic scale.

Details

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}, θ).

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

1

mrf2d documentation built on Jan. 26, 2022, 1:06 a.m.