mrf.nll: Calculate MRF negative log-likelihood
Description
Calculate the negative log-likelihood of MRF modelUsage
mrf.nll(par, crf, instances, infer.method = infer.chain, ...)
Arguments
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.