R: Train CRF model

train.crf {CRF} | R Documentation

## 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,
      infer.method = infer.chain,
      ...,
      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
`infer.method` | The inference method used to compute the likelihood
`...` | Extra parameters need by the inference method
`trace` | Non-negative integer to control the tracing informtion of the optimization process

### 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.

### Value

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

### See Also

`crf.update`, `crf.nll`, `make.crf`

[Package CRF version 0.4-3 Index]