mrf.nll {CRF} | R Documentation |
Calculate the negative log-likelihood of MRF model
mrf.nll(par, crf, instances, infer.method = infer.chain, ...)
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 |
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.
This function will return the value of MRF negative log-likilihood.
mrf.stat
, mrf.update
, train.mrf