pub struct CompositeObjective {
pub terms: Vec<(String, f64)>,
pub direction: Direction,
pub scalarizer: Scalarizer,
}Expand description
A scalar objective composed from several named metrics.
The composite is the single value the optimizer sees; the component metrics stay recorded on each trial, so a Pareto/multi-objective layer can be added later without schema migration.
Fields§
§terms: Vec<(String, f64)>(metric_name, weight) pairs. Negative weights penalize.
direction: DirectionDirection of the composite value. Overrides any per-objective
direction: see Study::primary_direction.
scalarizer: ScalarizerHow the weighted terms collapse into one scalar. Defaults to
Scalarizer::WeightedSum; absent in pre-scalarizer JSON, hence
serde(default).
Implementations§
Trait Implementations§
Source§impl Clone for CompositeObjective
impl Clone for CompositeObjective
Source§fn clone(&self) -> CompositeObjective
fn clone(&self) -> CompositeObjective
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompositeObjective
impl Debug for CompositeObjective
Source§impl<'de> Deserialize<'de> for CompositeObjective
impl<'de> Deserialize<'de> for CompositeObjective
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CompositeObjective
impl RefUnwindSafe for CompositeObjective
impl Send for CompositeObjective
impl Sync for CompositeObjective
impl Unpin for CompositeObjective
impl UnsafeUnpin for CompositeObjective
impl UnwindSafe for CompositeObjective
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more