Optimizers
module crystallize.experiments.optimizers
Section titled “module crystallize.experiments.optimizers”class Objective
Section titled “class Objective”Defines the optimization goal.
method Objective.__init__
Section titled “method Objective.__init__”__init__( metric: 'Union[str, List[str]]', direction: 'Union[str, List[str]]') → Noneclass BaseOptimizer
Section titled “class BaseOptimizer”The abstract base class for all optimization strategies.
method BaseOptimizer.__init__
Section titled “method BaseOptimizer.__init__”__init__(objective: 'Objective')method BaseOptimizer.ask
Section titled “method BaseOptimizer.ask”ask() → list[Treatment]Suggest one or more Treatments for the next trial.
method BaseOptimizer.get_best_treatment
Section titled “method BaseOptimizer.get_best_treatment”get_best_treatment() → TreatmentReturn the best treatment found after all trials.
method BaseOptimizer.tell
Section titled “method BaseOptimizer.tell”tell(objective_values: 'dict[str, float]') → NoneProvide the aggregated objective value(s) for the last trial.