Learn R Programming

CRF (version 0.4-3)

clamp.reset: 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 clamp.crf

clamped

The vector of fixed states of nodes

Value

The function will return the same clamped CRF.

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.

See Also

make.crf, clamp.crf

Examples

Run this code
# NOT RUN {
library(CRF)
data(Small)
crf <- clamp.crf(Small$crf, c(0, 0, 1, 1))
clamp.reset(crf, c(0,0,2,2))


# }

Run the code above in your browser using DataLab