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 toMath.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 Summary
ConstructorsConstructorDescriptionOptions(int maxTrials) Creates default options for maximizing with a given trial budget.Options(int maxTrials, boolean maximize) Creates default options with specified maximization direction.Options(int maxTrials, int initialTrials, boolean maximize, BayesianOptimization.Acquisition acquisition, double exploration, MercerKernel<double[]> kernel) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theacquisitionrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theexplorationrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theinitialTrialsrecord component.MercerKernel<double[]> kernel()Returns the value of thekernelrecord component.booleanmaximize()Returns the value of themaximizerecord component.intReturns the value of themaxTrialsrecord component.final StringtoString()Returns a string representation of this record class.withAcquisition(BayesianOptimization.Acquisition acquisition, double exploration) Returns an Options instance with the specified acquisition function and exploration parameter.
-
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
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
maxTrials
-
initialTrials
public int initialTrials()Returns the value of theinitialTrialsrecord component.- Returns:
- the value of the
initialTrialsrecord component
-
maximize
-
acquisition
Returns the value of theacquisitionrecord component.- Returns:
- the value of the
acquisitionrecord component
-
exploration
public double exploration()Returns the value of theexplorationrecord component.- Returns:
- the value of the
explorationrecord component
-
kernel
-