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