public class LBFGSBasicTrainer extends AbstractTrainer
LBFGS basic trainer
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Modifier and Type | Field and Description |
|---|---|
protected double |
epsForConvergence |
protected double |
invSigmaSquare |
protected int |
mForHessian |
doScaling, maxIteration, xtoledgeGen, featureGenerator, lambda, model| Constructor and Description |
|---|
LBFGSBasicTrainer(ModelGraph model,
FeatureGenerator featureGenerator) |
| Modifier and Type | Method and Description |
|---|---|
protected double |
computeFunctionGradient(Dataset diter,
double[] lambda,
double[] grad) |
protected double |
norm(double[] ar) |
void |
setAccuracy(int eps) |
void |
setGradientHistory(int history) |
void |
setInvSigmaSquare(int invSigmaSquare) |
boolean |
train(Dataset dataset)
Trains the CRF model with labeled dataset
|
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 mForHessian
protected double epsForConvergence
protected double invSigmaSquare
public LBFGSBasicTrainer(ModelGraph model, FeatureGenerator featureGenerator)
public void setGradientHistory(int history)
public void setAccuracy(int eps)
public void setInvSigmaSquare(int invSigmaSquare)
public boolean train(Dataset dataset)
Trainerdataset - the dataset for trainingprotected double norm(double[] ar)
protected double computeFunctionGradient(Dataset diter, double[] lambda, double[] grad)
Copyright © 2018 JULIE Lab, Germany. All rights reserved.