Record Class BasisPursuit.Options

java.lang.Object
java.lang.Record
smile.cs.BasisPursuit.Options
Record Components:
epsilon - the L2 constraint tolerance (‖Ax−y‖₂ ≤ ε). Use 0 for exact basis pursuit.
mu - barrier update factor (μ > 1, e.g. 10). The barrier parameter t is multiplied by mu at each outer iteration.
cgtol - convergence tolerance for the inner CG solver.
cgMaxIter - maximum CG iterations per Newton step.
maxIter - maximum number of outer (Newton) iterations.
tol - duality-gap tolerance; outer loop terminates when the surrogate duality gap satisfies gap/|f| < tol.
Enclosing class:
BasisPursuit

public static record BasisPursuit.Options(double epsilon, double mu, double cgtol, int cgMaxIter, int maxIter, double tol) extends Record
Hyperparameters for the log-barrier interior-point solver.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default options.
    Options(double epsilon, double mu, double cgtol, int cgMaxIter, int maxIter, double tol)
    Constructs options with defaults.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the cgMaxIter record component.
    double
    Returns the value of the cgtol record component.
    double
    Returns the value of the epsilon record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the maxIter record component.
    double
    mu()
    Returns the value of the mu record component.
    of(Properties props)
    Creates options from properties.
    double
    tol()
    Returns the value of the tol record component.
    Returns properties for persistence.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

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

    • Options

      public Options(double epsilon, double mu, double cgtol, int cgMaxIter, int maxIter, double tol)
      Constructs options with defaults.
    • Options

      public Options()
      Default options.
  • Method Details

    • toProperties

      public Properties toProperties()
      Returns properties for persistence.
      Returns:
      the properties.
    • of

      public static BasisPursuit.Options of(Properties props)
      Creates options from properties.
      Parameters:
      props - the properties.
      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. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      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.
    • epsilon

      public double epsilon()
      Returns the value of the epsilon record component.
      Returns:
      the value of the epsilon record component
    • mu

      public double mu()
      Returns the value of the mu record component.
      Returns:
      the value of the mu record component
    • cgtol

      public double cgtol()
      Returns the value of the cgtol record component.
      Returns:
      the value of the cgtol record component
    • cgMaxIter

      public int cgMaxIter()
      Returns the value of the cgMaxIter record component.
      Returns:
      the value of the cgMaxIter record component
    • maxIter

      public int maxIter()
      Returns the value of the maxIter record component.
      Returns:
      the value of the maxIter record component
    • tol

      public double tol()
      Returns the value of the tol record component.
      Returns:
      the value of the tol record component