public class CollinsBasicTrainer extends AbstractTrainer
Collins training conditional random field
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Modifier and Type | Field and Description |
|---|---|
protected double |
beta |
protected int |
topSolutions |
protected boolean |
useUpdated |
doScaling, maxIteration, xtoledgeGen, featureGenerator, lambda, model| Constructor and Description |
|---|
CollinsBasicTrainer(ModelGraph model,
FeatureGenerator featureGenerator) |
| Modifier and Type | Method and Description |
|---|---|
protected Labeler |
getLabeler() |
protected int |
getSegmentEnd(DataSequence dataSeq,
int start) |
protected double |
getSequenceScore(DataSequence dataSeq,
double[] grad) |
protected boolean |
isCorrect(DataSequence manual,
DataSequence auto) |
boolean |
train(Dataset dataset)
Trains the CRF model with labeled dataset
|
protected void |
updateWeights(DataSequence dataSeq,
int startPos,
int endPos,
double wt,
double[] grad) |
genStateVector, genStateVectorLog, getMaxIteration, needScaling, setMaxIteration, setScalingOptioncomputeTransMatrix, computeTransMatrix, getFeatureGenerator, getModelGraph, getModelParameter, readModelParameter, saveModelParameterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFeatureGenerator, getModelGraph, getModelParameter, saveModelParameterprotected int topSolutions
protected double beta
protected boolean useUpdated
public CollinsBasicTrainer(ModelGraph model, FeatureGenerator featureGenerator)
public boolean train(Dataset dataset)
Trainerdataset - the dataset for trainingprotected boolean isCorrect(DataSequence manual, DataSequence auto)
protected void updateWeights(DataSequence dataSeq, int startPos, int endPos, double wt, double[] grad)
protected double getSequenceScore(DataSequence dataSeq, double[] grad)
protected Labeler getLabeler()
protected int getSegmentEnd(DataSequence dataSeq, int start)
Copyright © 2018 JULIE Lab, Germany. All rights reserved.