jmaxent
Class Train

java.lang.Object
  extended by jmaxent.Train

public class Train
extends java.lang.Object

The Class Train.


Field Summary
 Model model
          The model.
 int numFeatures
          The num features.
 int numLabels
          The num labels.
 
Constructor Summary
Train()
          Instantiates a new train.
 
Method Summary
 double computeLogLiGradient(double[] lambda, double[] gradLogLi, int numIter, java.io.PrintWriter fout)
          Compute log li gradient.
 void doTrain(java.io.PrintWriter fout)
          Do train.
 void init()
          Inits the.
static double norm(double[] vect)
          Norm.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

model

public Model model
The model.


numLabels

public int numLabels
The num labels.


numFeatures

public int numFeatures
The num features.

Constructor Detail

Train

public Train()
Instantiates a new train.

Method Detail

init

public void init()
Inits the.


norm

public static double norm(double[] vect)
Norm.

Parameters:
vect - the vect
Returns:
the double

doTrain

public void doTrain(java.io.PrintWriter fout)
Do train.

Parameters:
fout - the fout

computeLogLiGradient

public double computeLogLiGradient(double[] lambda,
                                   double[] gradLogLi,
                                   int numIter,
                                   java.io.PrintWriter fout)
Compute log li gradient.

Parameters:
lambda - the lambda
gradLogLi - the grad log li
numIter - the num iter
fout - the fout
Returns:
the double