public static class LASSO.Trainer extends RegressionTrainer<double[]>
| Constructor and Description |
|---|
Trainer(double lambda)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
LASSO.Trainer |
setMaxNumIteration(int maxIter)
Sets the maximum number of iterations.
|
LASSO.Trainer |
setTolerance(double tol)
Sets the tolerance for stopping iterations (relative target duality gap).
|
LASSO |
train(double[][] x,
double[] y)
Learns a regression model with given training data.
|
LASSO |
train(smile.math.matrix.IMatrix x,
double[] y) |
setAttributespublic Trainer(double lambda)
lambda - the number of trees.public LASSO.Trainer setTolerance(double tol)
tol - the tolerance for stopping iterations.public LASSO.Trainer setMaxNumIteration(int maxIter)
maxIter - the maximum number of iterations.public LASSO train(double[][] x, double[] y)
RegressionTrainertrain in class RegressionTrainer<double[]>x - the training instances.y - the training response values.public LASSO train(smile.math.matrix.IMatrix x, double[] y)