mrf.nll {CRF} | R Documentation |
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
par |
The parameter vector of CRF |
crf |
The CRF |
instances |
The training data matrix of MRF model |
infer.method |
The inference method used to compute the likelihood |
... |
Extra parameters need by the inference method |
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.
Value
This function will return the value of MRF negative log-likilihood.
See Also
mrf.stat
, mrf.update
, train.mrf
[Package CRF version 0.4-3 Index]