smr_array {mrf2d} | R Documentation |
Summarized representation of theta arrays
Description
smr_array
creates a vector containing only the free parameters from an array
given a restriction family
. exapand_array
is the reverse
operation, expanding a complete array from the vector of sufficient statistics.
Usage
smr_array(theta, family)
expand_array(theta_vec, family, mrfi, C)
Arguments
theta |
A 3-dimensional array describing potentials. Slices represent
interacting positions, rows represent pixel values and columns represent
neighbor values. As an example: |
family |
The family of parameter restrictions to potentials. Families
are:
|
theta_vec |
A |
mrfi |
A |
C |
The maximum value of the field. |
Details
The order the parameters appear in the summarized vector matches
the order in smr_stat()
.
vec_description()
provides a data.frame
object describing
which are the relative positions and interactions associated with each
element of the summarized vector in the same order.
Value
smr_array
returns a numeric vector with the free parameters of theta
.
expand_array
returns a three-dimensional array
of potentials.
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
smr_array(theta_potts, "onepar")
smr_array(theta_potts, "oneeach")
expand_array(0.99, family = "onepar", mrfi = mrfi(1), C = 2)
expand_array(c(0.1, 0.2), family = "oneeach", mrfi = mrfi(1), C = 3)