Learn R Programming

CRF (version 0.3-8)

train.crf: Train CRF model

Description

Train the CRF model to estimate the parameters

Usage

train.crf(crf, instances, node.fea = NULL, edge.fea = NULL,
  node.ext = NULL, edge.ext = NULL, nll = crf.nll, trace = 0)

Arguments

crf
The CRF
instances
The training data matrix of CRF model
node.fea
The list of node features
edge.fea
The list of edge features
node.ext
The list of extended information of node features
edge.ext
The list of extended information of edge features
nll
The function to calculate negative log likelihood
trace
Non-negative integer to control the tracing informtion of the optimization process

Value

  • This function will directly modify the CRF and return the same CRF.

Details

This function train the CRF model.

In the training data matrix instances, each row is an instance and each column corresponds a node in CRF. The variables node.fea, edge.fea, node.ext, edge.ext are lists of length equal to the number of instances, and their elements are defined as in crf.update respectively.

See Also

crf.update, crf.nll, make.crf