Train the CRF model to estimate the parameters
train.crf(
crf,
instances,
node.fea = NULL,
edge.fea = NULL,
node.ext = NULL,
edge.ext = NULL,
nll = crf.nll,
infer.method = infer.chain,
...,
trace = 0
)
The CRF
The training data matrix of CRF model
The list of node features
The list of edge features
The list of extended information of node features
The list of extended information of edge features
The function to calculate negative log likelihood
The inference method used to compute the likelihood
Extra parameters need by the inference method
Non-negative integer to control the tracing informtion of the optimization process
This function will directly modify the CRF and return the same CRF.
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.