cpmrf2d: Conditional probabilities in a pixel position

Description Usage Arguments Value Author(s) See Also Examples

Description

Computes the vector of conditional probabilities for a pixel position given a field, an interaction structure and a parameter array.

Usage

1
cp_mrf2d(Z, mrfi, theta, pos)

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.

pos

Length-2 vector with the position to compute conditional probabilities in.

Value

A numeric vector with the conditional probabilities.

Author(s)

Victor Freguglia

See Also

A paper with detailed description of the package can be found at https://arxiv.org/abs/2006.00383

Examples

1
2
cp_mrf2d(Z_potts, mrfi(1), theta_potts, c(57,31))
cp_mrf2d(Z_potts, mrfi(1), theta_potts*0.1, c(57,31))

mrf2d documentation built on Oct. 30, 2020, 1:07 a.m.