clamp.reset: Reset clamped CRF

Description Usage Arguments Details Value See Also Examples

View source: R/clamp.R

Description

Reset clamped CRF by changing the states of clamped nodes

Usage

1
clamp.reset(crf, clamped)

Arguments

crf

The clamped CRF generated by clamp.crf

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

make.crf, clamp.crf

Examples

1
2
3
4
library(CRF)
data(Small)
crf <- clamp.crf(Small$crf, c(0, 0, 1, 1))
clamp.reset(crf, c(0,0,2,2))

CRF documentation built on Dec. 1, 2019, 3:02 a.m.