Learn R Programming

CRF (version 0.3-6)

mrf.nll: Calculate MRF negative log-likelihood

Description

Calculate the negative log-likelihood of MRF model

Usage

mrf.nll(par, crf, instances, infer.method = infer.chain, ...)

Arguments

crf
The CRF
par
The parameter vector of CRF
instances
The training data matrix of MRF model
infer.method
The inference method used to compute the likelihood
...
Other parameters need by the inference method

Value

  • This function will return the value of MRF negative log-likilihood.

Details

This function calculates the negative log-likelihood of MRF model as well as the gradient. This function is intended to be called by optimization algorithm in training process. Before calling this function, the MRF sufficient statistics must be calculated and stored in object par.stat of CRF.

In the training data matrix instances, each row is an instance and each column corresponds a node in CRF.

See Also

mrf.stat, mrf.update, train.mrf