clamp.reset {CRF} | R Documentation |
Reset clamped CRF
Description
Reset clamped CRF by changing the states of clamped nodes
Usage
clamp.reset(crf, clamped)
Arguments
crf |
The clamped CRF generated by |
clamped |
The vector of fixed states of nodes |
Details
The function will reset a clamped CRF by changing the states of fixed nodes.
The vector clamped
contains the desired state for each node
while zero means the state is not fixed. The node and edge potentials are
updated to the conditional potentials based on the clamped vector.
Value
The function will return the same clamped CRF.
See Also
Examples
library(CRF)
data(Small)
crf <- clamp.crf(Small$crf, c(0, 0, 1, 1))
clamp.reset(crf, c(0,0,2,2))
[Package CRF version 0.4-3 Index]