Record Class RidgeRegression.Options
java.lang.Object
java.lang.Record
smile.regression.RidgeRegression.Options
- Record Components:
lambda- the shrinkage/regularization parameter. Large lambda means more shrinkage. Choosing an appropriate value of lambda is important, and also difficult. Its length may be 1 so that its value is applied to all variables.beta0- the generalized ridge penalty target. Its length may be 1 so that its value is applied to all variables.
- Enclosing class:
RidgeRegression
Ridge regression hyperparameters.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]beta0()Returns the value of thebeta0record component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.double[]lambda()Returns the value of thelambdarecord component.static RidgeRegression.Optionsof(Properties props) Returns the options from properties.Returns the persistent set of hyperparameters includingsmile.ridge.lambdais the shrinkage/regularization parameter.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Options
public Options(double[] lambda, double[] beta0) Constructor. -
Options
public Options(double lambda) Constructor.- Parameters:
lambda- the shrinkage/regularization parameter.
-
Options
public Options(double lambda, double beta0) Constructor.- Parameters:
lambda- the shrinkage/regularization parameter.beta0- the generalized ridge penalty target.
-
-
Method Details
-
toProperties
Returns the persistent set of hyperparameters includingsmile.ridge.lambdais the shrinkage/regularization parameter. Large lambda means more shrinkage. Choosing an appropriate value of lambda is important, and also difficult.smile.ridge.standard.erroris a boolean. If true, compute the estimated standard errors of the estimate of parameters
- 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 withObjects::equals(Object,Object). -
lambda
-
beta0
-