Record Class OLS.Options

java.lang.Object
java.lang.Record
smile.regression.OLS.Options
Record Components:
method - the fitting method.
stderr - if true, compute the standard errors of the estimate of parameters.
recursive - if true, the return model supports recursive least squares.
Enclosing class:
OLS

public static record OLS.Options(OLS.Method method, boolean stderr, boolean recursive) extends Record
Least squares hyperparameters.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
    Options(OLS.Method method, boolean stderr, boolean recursive)
    Creates an instance of a Options record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the method record component.
    of(Properties props)
    Returns the options from properties.
    boolean
    Returns the value of the recursive record component.
    boolean
    Returns the value of the stderr record component.
    Returns the persistent set of hyperparameters including smile.ols.method (default "svd") is a string (svd or qr) for the fitting method smile.ols.standard.error (default true) is a boolean.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Options

      public Options()
      Constructor.
    • Options

      public Options(OLS.Method method, boolean stderr, boolean recursive)
      Creates an instance of a Options record class.
      Parameters:
      method - the value for the method record component
      stderr - the value for the stderr record component
      recursive - the value for the recursive record component
  • Method Details

    • toProperties

      public Properties toProperties()
      Returns the persistent set of hyperparameters including
      • smile.ols.method (default "svd") is a string (svd or qr) for the fitting method
      • smile.ols.standard.error (default true) is a boolean. If true, compute the estimated standard errors of the estimate of parameters
      • smile.ols.recursive (default true) is a boolean. If true, the return model supports recursive least squares
      Returns:
      the persistent set.
    • of

      public static OLS.Options of(Properties props)
      Returns the options from properties.
      Parameters:
      props - the hyperparameters.
      Returns:
      the options.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • method

      public OLS.Method method()
      Returns the value of the method record component.
      Returns:
      the value of the method record component
    • stderr

      public boolean stderr()
      Returns the value of the stderr record component.
      Returns:
      the value of the stderr record component
    • recursive

      public boolean recursive()
      Returns the value of the recursive record component.
      Returns:
      the value of the recursive record component