decode.block: Decoding method using block iterated conditional modes...

Description Usage Arguments Details Value Examples

View source: R/decode.R

Description

Computing the most likely configuration for CRF

Usage

1
2
3
4
5
6
7
8
decode.block(
  crf,
  blocks,
  decode.method = decode.tree,
  restart = 0,
  start = apply(crf$node.pot, 1, which.max),
  ...
)

Arguments

crf

The CRF

blocks

A list of vectors, each vector containing the nodes in a block

decode.method

The decoding method to solve the clamped CRF

restart

Non-negative integer to control how many restart iterations are repeated

start

An initial configuration, a good start will significantly reduce the seraching time

...

The parameters for decode.method

Details

Approximate decoding with the block iterated conditional modes algorithm

Value

This function will return the most likely configuration, which is a vector of length crf$n.nodes.

Examples

1
2
3
library(CRF)
data(Small)
d <- decode.block(Small$crf, list(c(1,3), c(2,4)))

CRF documentation built on Dec. 2, 2019, 1:11 a.m.