Record Class BayesianOptimization.Options

java.lang.Object
java.lang.Record
smile.hpo.BayesianOptimization.Options
Record Components:
maxTrials - the total number of trials/evaluations to perform.
initialTrials - the number of initial random trials before GP kicks in. If ≤ 0, automatically set to Math.min(maxTrials, Math.max(5, 2 * d)).
maximize - true to maximize the objective function, false to minimize.
acquisition - the acquisition function strategy.
exploration - exploration trade-off parameter (ξ for EI/PI, κ for UCB).
kernel - the Mercer covariance kernel for Gaussian Process regression.
All Implemented Interfaces:
Serializable
Enclosing class:
BayesianOptimization

public static record BayesianOptimization.Options(int maxTrials, int initialTrials, boolean maximize, BayesianOptimization.Acquisition acquisition, double exploration, MercerKernel<double[]> kernel) extends Record implements Serializable
Configuration options for Bayesian Optimization.
See Also:
  • Constructor Details

    • Options

      public Options(int maxTrials, int initialTrials, boolean maximize, BayesianOptimization.Acquisition acquisition, double exploration, MercerKernel<double[]> kernel)
      Constructor.
    • Options

      public Options(int maxTrials)
      Creates default options for maximizing with a given trial budget.
      Parameters:
      maxTrials - the total number of evaluations.
    • Options

      public Options(int maxTrials, boolean maximize)
      Creates default options with specified maximization direction.
      Parameters:
      maxTrials - the total number of evaluations.
      maximize - true to maximize, false to minimize.
  • Method Details

    • withAcquisition

      public BayesianOptimization.Options withAcquisition(BayesianOptimization.Acquisition acquisition, double exploration)
      Returns an Options instance with the specified acquisition function and exploration parameter.
      Parameters:
      acquisition - the acquisition function.
      exploration - the exploration parameter.
      Returns:
      a new Options instance.
    • 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 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.
    • maxTrials

      public int maxTrials()
      Returns the value of the maxTrials record component.
      Returns:
      the value of the maxTrials record component
    • initialTrials

      public int initialTrials()
      Returns the value of the initialTrials record component.
      Returns:
      the value of the initialTrials record component
    • maximize

      public boolean maximize()
      Returns the value of the maximize record component.
      Returns:
      the value of the maximize record component
    • acquisition

      public BayesianOptimization.Acquisition acquisition()
      Returns the value of the acquisition record component.
      Returns:
      the value of the acquisition record component
    • exploration

      public double exploration()
      Returns the value of the exploration record component.
      Returns:
      the value of the exploration record component
    • kernel

      public MercerKernel<double[]> kernel()
      Returns the value of the kernel record component.
      Returns:
      the value of the kernel record component