infer.lbp {CRF} | R Documentation |
Inference method using loopy belief propagation
Description
Computing the partition function and marginal probabilities
Usage
infer.lbp(crf, max.iter = 10000, cutoff = 1e-04, verbose = 0, maximize = FALSE)
Arguments
crf |
The CRF |
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 |
Details
Approximate inference using sum-product loopy belief propagation
Value
This function will return a list with components:
node.bel |
Node belief. It is a matrix with |
edge.bel |
Edge belief. It is a list of matrices. The size of list is |
logZ |
The logarithmic value of CRF normalization factor Z. |
Examples
library(CRF)
data(Small)
i <- infer.lbp(Small$crf)
[Package CRF version 0.4-3 Index]