public static class Maxent.Trainer extends ClassifierTrainer<int[]>
| Constructor and Description |
|---|
Maxent.Trainer(int p)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
setMaxNumIteration(int maxIter)
Sets the maximum number of BFGS stopping iterations.
|
void |
setRegularizationFactor(double lambda)
Sets the regularization factor.
|
void |
setTolerance(double tol)
Sets the tolerance for BFGS stopping iterations.
|
Maxent |
train(int[][] x,
int[] y)
Learns a classifier with given training data.
|
setAttributespublic Maxent.Trainer(int p)
p - the dimension of feature space.public void setRegularizationFactor(double lambda)
lambda - regularization factor.public void setTolerance(double tol)
tol - tolerance for stopping iterations.public void setMaxNumIteration(int maxIter)
maxIter - maximum number of iterations.public Maxent train(int[][] x, int[] y)
ClassifierTrainertrain in class ClassifierTrainer<int[]>x - the training instances.y - the training labels.Copyright © 2015. All rights reserved.