Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tmpls
protected ACRF.Template[] tmpls
training
protected InstanceList training
testing
protected InstanceList testing
featurePipe
protected Pipe featurePipe
tokPipe
protected Pipe tokPipe
evaluator
protected ACRFEvaluator evaluator
ACRFExtractorTrainer
public ACRFExtractorTrainer()
setTemplates
public ACRFExtractorTrainer setTemplates(ACRF.Template[] tmpls)
setDataSource
public ACRFExtractorTrainer setDataSource(java.util.Iterator<Instance> trainIterator,
java.util.Iterator<Instance> testIterator)
setData
public ACRFExtractorTrainer setData(InstanceList training,
InstanceList testing)
setNumIterations
public ACRFExtractorTrainer setNumIterations(int numIter)
getNumIter
public int getNumIter()
setPipes
public ACRFExtractorTrainer setPipes(Pipe tokPipe,
Pipe featurePipe)
setEvaluator
public ACRFExtractorTrainer setEvaluator(ACRFEvaluator evaluator)
setTrainingMethod
public ACRFExtractorTrainer setTrainingMethod(ACRFTrainer acrfTrainer)
setTokenizatioFilter
public ACRFExtractorTrainer setTokenizatioFilter(TokenizationFilter filter)
setCacheUnrolledGraphs
public ACRFExtractorTrainer setCacheUnrolledGraphs(boolean cacheUnrolledGraphs)
setNumCheckpointIterations
public ACRFExtractorTrainer setNumCheckpointIterations(int numCheckpointIterations)
setCheckpointDirectory
public ACRFExtractorTrainer setCheckpointDirectory(java.io.File checkpointDirectory)
setUsePerTemplateTrain
public ACRFExtractorTrainer setUsePerTemplateTrain(boolean usePerTemplateTrain)
setPerTemplateIterations
public ACRFExtractorTrainer setPerTemplateIterations(int numIter)
getTrainer
public ACRFTrainer getTrainer()
getFilter
public TokenizationFilter getFilter()
trainExtractor
public ACRFExtractor trainExtractor()
trainAcrf
public ACRF trainAcrf()
- Trains a new ACRF object with the given settings. Subclasses may override this method
to implement alternative training procedures.
- Returns:
- a trained ACRF
setupData
protected void setupData()
getTrainingData
public InstanceList getTrainingData()
getTestingData
public InstanceList getTestingData()
extractOnTestData
public Extraction extractOnTestData(ACRFExtractor extor)
setInferencer
public ACRFExtractorTrainer setInferencer(Inferencer inferencer)
setViterbiInferencer
public ACRFExtractorTrainer setViterbiInferencer(Inferencer viterbiInferencer)
setDataSubsets
public ACRFExtractorTrainer setDataSubsets(java.util.Random random,
double trainingPct,
double testingPct)