Record Class ElasticNet.Options
java.lang.Object
java.lang.Record
smile.regression.ElasticNet.Options
- Record Components:
lambda1- L1 regularization penalty parameter.lambda2- L2 regularization penalty parameter.tol- convergence tolerance on relative duality gap.maxIter- maximum interior point method (IPM) iterations.alpha- objective function decrease ratio threshold.beta- backtracking line search step contraction factor.eta- preconditioned conjugate gradient termination tolerance.lsMaxIter- maximum backtracking line search iterations.pcgMaxIter- maximum conjugate gradient 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
Hyperparameters for Elastic Net regression.
-
Constructor Summary
ConstructorsConstructorDescriptionOptions(double lambda1, double lambda2) Constructs options with default solver tolerances and iteration limits.Options(double lambda1, double lambda2, double tol, int maxIter) Constructs options with specified convergence tolerance and maximum iterations.Options(double lambda1, double lambda2, double tol, int maxIter, double alpha, double beta, double eta, int lsMaxIter, int pcgMaxIter) Validates hyperparameter values. -
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) Deserializes options from a Properties instance.intReturns the value of thepcgMaxIterrecord component.doubletol()Returns the value of thetolrecord component.Serializes options to a Properties map.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) Validates hyperparameter values. -
Options
public Options(double lambda1, double lambda2) Constructs options with default solver tolerances and iteration limits.- Parameters:
lambda1- L1 regularization penalty.lambda2- L2 regularization penalty.
-
Options
public Options(double lambda1, double lambda2, double tol, int maxIter) Constructs options with specified convergence tolerance and maximum iterations.- Parameters:
lambda1- L1 regularization penalty.lambda2- L2 regularization penalty.tol- convergence tolerance.maxIter- maximum iterations.
-
-
Method Details
-
toProperties
Serializes options to a Properties map.- Returns:
- persistent configuration properties.
-
of
Deserializes options from a Properties instance.- Parameters:
props- configuration properties.- Returns:
- parsed Options record.
-
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
-