|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.pawjaw.classification.crf.lmcbt.CRFTrainer
public class CRFTrainer
Main entry point for training new CRF model. Following instantiation, set all training examples using set() method, then run one of the train() methods.
Constructor Summary | |
---|---|
CRFTrainer(Configuration c,
int example_sequences)
Instantiate this, then use set() repeatedly finally followed by train(). |
Method Summary | |
---|---|
double[][][] |
serialize()
Serialize trained CRF model to be written to disk and/or used for subsequent inference (labeling new data). |
void |
set(int sequence_index,
Point[] points,
int[] labels)
Set a new training example. |
void |
train()
Train a new CRF model with the number of boosting iterations specified in the configuration given to the constructor. |
void |
train(java.util.List<Point[]> pointss,
java.util.List<int[]> true_labelss)
Train a new CRF model with the maximum number of boosting iterations specified in the configuration given to the constructor but with the option to stop early if the incremental improvement in Viterbi accuracy is less than the amount specified in the configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CRFTrainer(Configuration c, int example_sequences)
c
- options for training specified hereexample_sequences
- number of example sequences to be used in trainingMethod Detail |
---|
public void set(int sequence_index, Point[] points, int[] labels)
sequence_index
- ranges from 0 to example_sequences - 1 (inclusive)points
- data points in the given sequencelabels
- true labels for the given sequencepublic void train()
public void train(java.util.List<Point[]> pointss, java.util.List<int[]> true_labelss)
pointss
- validation data pointstrue_labelss
- validation labelspublic double[][][] serialize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |