infer.rbp: Inference method using residual belief propagation
Description
Computing the partition function and marginal probabilities
Usage
infer.rbp(crf, max.iter = 10000, cutoff = 1e-04, verbose = 0, maximize = FALSE)
Arguments
max.iter
The maximum allowed iterations of termination criteria
cutoff
The convergence cutoff of termination criteria
verbose
Non-negative integer to control the tracing informtion in algorithm
maximize
Logical variable to indicate using max-product instead of sum-product
Value
This function will return a list with components:
node.belNode belief. It is a matrix with crf$n.nodes
rows and crf$max.state
columns.
edge.belEdge belief. It is a list of matrices. The size of list is crf$n.edges
and
the matrix i
has crf$n.states[crf$edges[i,1]]
rows and crf$n.states[crf$edges[i,2]]
columns.
logZThe logarithmic value of CRF normalization factor Z.
Details
Approximate inference using sum-product residual belief propagation
Examples
Run this code# NOT RUN {
library(CRF)
data(Small)
i <- infer.rbp(Small$crf)
# }
Run the code above in your browser using DataLab