Record Class ElasticNet.Options
java.lang.Object
java.lang.Record
smile.regression.ElasticNet.Options
- Record Components:
lambda1- the L1 shrinkage/regularization parameterlambda2- the L2 shrinkage/regularization parametertol- 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:
ElasticNet
public static record ElasticNet.Options(double lambda1, double lambda2, double tol, int maxIter, double alpha, double beta, double eta, int lsMaxIter, int pcgMaxIter)
extends Record
Elastic Net hyperparameters.
-
Constructor Summary
ConstructorsConstructorDescriptionOptions(double lambda1, double lambda2) Constructor.Options(double lambda1, double lambda2, double tol, int maxIter) Constructor.Options(double lambda1, double lambda2, double tol, int maxIter, double alpha, double beta, double eta, int lsMaxIter, int pcgMaxIter) Constructor. -
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.doublelambda1()Returns the value of thelambda1record component.doublelambda2()Returns the value of thelambda2record component.intReturns the value of thelsMaxIterrecord component.intmaxIter()Returns the value of themaxIterrecord component.static ElasticNet.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.elastic_net.lambda1is the L1 shrinkage/regularization parametersmile.elastic_net.lambda2is the L2 shrinkage/regularization parametersmile.elastic_net.toleranceis the tolerance for stopping iterations (relative target duality gap).final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Options
public Options(double lambda1, double lambda2, double tol, int maxIter, double alpha, double beta, double eta, int lsMaxIter, int pcgMaxIter) Constructor. -
Options
public Options(double lambda1, double lambda2) Constructor.- Parameters:
lambda1- the L1 shrinkage/regularization parameterlambda2- the L2 shrinkage/regularization parameter
-
Options
public Options(double lambda1, double lambda2, double tol, int maxIter) Constructor.- Parameters:
lambda1- the L1 shrinkage/regularization parameterlambda2- the L2 shrinkage/regularization parametertol- 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.elastic_net.lambda1is the L1 shrinkage/regularization parametersmile.elastic_net.lambda2is the L2 shrinkage/regularization parametersmile.elastic_net.toleranceis the tolerance for stopping iterations (relative target duality gap).smile.elastic_net.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. -
lambda1
-
lambda2
-
tol
-
maxIter
-
alpha
-
beta
-
eta
-
lsMaxIter
-
pcgMaxIter
public int pcgMaxIter()Returns the value of thepcgMaxIterrecord component.- Returns:
- the value of the
pcgMaxIterrecord component
-