Record Class LASSO.Options
java.lang.Object
java.lang.Record
smile.regression.LASSO.Options
- Record Components:
lambda- the shrinkage/regularization parameter.tol- the tolerance of convergence test (relative target duality gap).maxIter- the maximum number of IPM (Newton) iterations.alpha- the minimum fraction of decrease in the objective function.beta- the step size decrease factoreta- the tolerance for PCG termination.lsMaxIter- the maximum number of backtracking line search iterations.pcgMaxIter- the maximum number of PCG iterations.
- Enclosing class:
LASSO
public static record LASSO.Options(double lambda, double tol, int maxIter, double alpha, double beta, double eta, int lsMaxIter, int pcgMaxIter)
extends Record
Lasso regression hyperparameters.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublealpha()Returns the value of thealpharecord component.doublebeta()Returns the value of thebetarecord component.final booleanIndicates whether some other object is "equal to" this one.doubleeta()Returns the value of theetarecord component.final inthashCode()Returns a hash code value for this object.doublelambda()Returns the value of thelambdarecord component.intReturns the value of thelsMaxIterrecord component.intmaxIter()Returns the value of themaxIterrecord component.static LASSO.Optionsof(Properties props) Returns the options from properties.intReturns the value of thepcgMaxIterrecord component.doubletol()Returns the value of thetolrecord component.Returns the persistent set of hyperparameters includingsmile.lasso.lambdais the shrinkage/regularization parameter.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Options
public Options(double lambda, double tol, int maxIter, double alpha, double beta, double eta, int lsMaxIter, int pcgMaxIter) Constructor. -
Options
public Options(double lambda) Constructor.- Parameters:
lambda- the shrinkage/regularization parameter.
-
Options
public Options(double lambda, double tol, int maxIter) Constructor.- Parameters:
lambda- the shrinkage/regularization parameter.tol- the tolerance of convergence test (relative target duality gap).maxIter- the maximum number of IPM (Newton) iterations.
-
-
Method Details
-
toProperties
Returns the persistent set of hyperparameters includingsmile.lasso.lambdais the shrinkage/regularization parameter. Large lambda means more shrinkage. Choosing an appropriate value of lambda is important, and also difficult.smile.lasso.toleranceis the tolerance for stopping iterations (relative target duality gap).smile.lasso.iterationsis the maximum number of IPM (Newton) iterations.
- Returns:
- the persistent set.
-
of
Returns the options from properties.- Parameters:
props- the hyperparameters.- Returns:
- the options.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
lambda
-
tol
-
maxIter
-
alpha
-
beta
-
eta
-
lsMaxIter
-
pcgMaxIter
public int pcgMaxIter()Returns the value of thepcgMaxIterrecord component.- Returns:
- the value of the
pcgMaxIterrecord component
-