calhoun.analysis.crf
Interface CRFInference
- All Known Implementing Classes:
- SemiMarkovViterbi, SemiMarkovViterbiNoCache, Viterbi
public interface CRFInference
an interface to inference algorithms for CRFs. Given a model, a set of feature weights, and a set of input data, the
algorithm selects a sequence of hidden states. The Viterbi dynamic programming algorithm and its variants are usually used
for this problem.
predict
CRFInference.InferenceResult predict(ModelManager mm,
InputSequence<?> data,
double[] weights)
- Return the labelling that maximizes the conditional probability P(y|x).
- Parameters:
mm - model to use for trainingdata - input sequence to labelweights - array of feature weights. Usually these will be derived from a training pass.
- Returns:
- inference result containing the hidden states which are predicted and the score outputs.