public abstract class AbstractTrainer extends AbstractCRF implements Trainer
Abstract class for training conditional random field
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
doScaling |
protected int |
maxIteration |
protected static double |
xtol |
edgeGen, featureGenerator, lambda, model| Constructor and Description |
|---|
AbstractTrainer(ModelGraph model,
FeatureGenerator featureGen) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
genStateVector(DoubleDenseMatrix transMatrix,
double[] oldStateVector,
double[] newStateVector,
boolean transpose) |
protected void |
genStateVectorLog(DoubleDenseMatrix transMatrix,
double[] oldStateVector,
double[] newStateVector,
boolean transpose) |
int |
getMaxIteration()
Gets the number of maximum iterations
|
boolean |
needScaling()
Gets the scaling option.
|
void |
setMaxIteration(int maxIteration)
Sets the number of maximum iterations
|
void |
setScalingOption(boolean option)
Sets the scaling option
|
computeTransMatrix, computeTransMatrix, getFeatureGenerator, getModelGraph, getModelParameter, readModelParameter, saveModelParameterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFeatureGenerator, getModelGraph, getModelParameter, saveModelParameter, trainprotected static double xtol
protected boolean doScaling
protected int maxIteration
public AbstractTrainer(ModelGraph model, FeatureGenerator featureGen)
public boolean needScaling()
TrainerneedScaling in interface Trainerpublic void setScalingOption(boolean option)
TrainersetScalingOption in interface Traineroption - the scaling optionpublic int getMaxIteration()
TrainergetMaxIteration in interface Trainerpublic void setMaxIteration(int maxIteration)
TrainersetMaxIteration in interface TrainermaxIteration - the number of maximum iterationsprotected void genStateVector(DoubleDenseMatrix transMatrix, double[] oldStateVector, double[] newStateVector, boolean transpose)
protected void genStateVectorLog(DoubleDenseMatrix transMatrix, double[] oldStateVector, double[] newStateVector, boolean transpose)
Copyright © 2018 JULIE Lab, Germany. All rights reserved.