|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.pawjaw.classification.crf.lmcbt.CRFInference
public class CRFInference
Class to take trained and serialized CRF model and apply to new data for labeling. Create new instance then use set() method to specify model and configuration. Configuration specified should match that used to train the specified CRF model.
Constructor Summary | |
---|---|
CRFInference()
|
Method Summary | |
---|---|
double |
accuracyForwardBackward(java.util.List<Point[]> pointss,
java.util.List<int[]> true_labelss)
Label given sequence sand compare to given labels for testing purposes. |
double |
accuracyViterbi(java.util.List<Point[]> pointss,
java.util.List<int[]> true_labelss)
Label given sequence sand compare to given labels for testing purposes. |
int |
correctForwardBackward(ExpandedPointSequence eps,
int[] true_labels)
Label given sequence and compare to given labels for testing purposes. |
int |
correctVirterbi(ExpandedPointSequence eps,
int[] true_labels)
Label given sequence and compare to given labels for testing purposes. |
int[] |
labelForwardBackward(ExpandedPointSequence eps)
Infer the labels of the given sequence using the Forward-Backward method (most likely individual point-wise labels ). |
int[] |
labelViterbi(ExpandedPointSequence eps)
Infer the labels of the given sequence using the Viterbi method (most likely overall label sequence). |
void |
set(Configuration c,
double[][][] sbt_k)
Set the configuration options and the CRF model. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CRFInference()
Method Detail |
---|
public void set(Configuration c, double[][][] sbt_k)
c
- configuration optionssbt_k
- serialized CRF modelpublic int correctVirterbi(ExpandedPointSequence eps, int[] true_labels)
eps
- sequence to labeltrue_labels
- true labels of the points in the sequence
public int correctForwardBackward(ExpandedPointSequence eps, int[] true_labels)
eps
- sequence to labeltrue_labels
- true labels of the points in the sequence
public double accuracyViterbi(java.util.List<Point[]> pointss, java.util.List<int[]> true_labelss)
pointss
- sequences to labeltrue_labelss
- true labels of the points in the sequences
public double accuracyForwardBackward(java.util.List<Point[]> pointss, java.util.List<int[]> true_labelss)
pointss
- sequences to labeltrue_labelss
- true labels of the points in the sequences
public int[] labelViterbi(ExpandedPointSequence eps)
eps
- given sequence to label
public int[] labelForwardBackward(ExpandedPointSequence eps)
eps
- given sequence to label
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |