Learn R Programming

mrf2d (version 0.2.0)

smr_array: Summarized representation of theta arrays

Description

Creates a vector with only the free parameters from an array.

Usage

smr_array(theta, family)

Arguments

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 pairs of values 0,2 in the second relative position of mrfi.

family

The family of parameter restrictions to potentials. Families are: 'onepar', 'oneeach', 'absdif', 'dif' or 'free'. See mrf2d-familiy.

Value

A numeric vector with the free parameters of theta.

Details

The order the parameters appear in the vector matches the order in smr_stat().

Examples

Run this code
# NOT RUN {
smr_array(theta_potts, "onepar")
smr_array(theta_potts, "oneeach")

# }

Run the code above in your browser using DataLab