Skip to main content

MultiFidelity

Struct MultiFidelity 

pub struct MultiFidelity { /* private fields */ }
Expand description

A standard synthetic surface plus a cheap, correlated low-fidelity proxy.

See the module documentation for the model. Build one with MultiFidelity::bowl (smooth, unimodal) or MultiFidelity::rugged (multimodal), and read its ladder with fidelities.

Implementations§

§

impl MultiFidelity

pub fn new( base: Problem, min_fidelity: u64, max_fidelity: u64, bias: f64, noise: f64, ) -> Result<Self>

Builds a multi-fidelity problem over base.

bias is the amplitude of the displaced proxy bowl and noise the amplitude of the per-evaluation wobble; both are scaled by decay and vanish at the top fidelity.

§Errors

Error::InvalidSpace if base‘s schema is malformed (the built-in problems’ never are) or the ladder is degenerate (min_fidelity zero, or not below max_fidelity).

pub fn bowl() -> Result<Self>

The smooth bowl fixture: a 4-D sphere over the 1 → 9 ladder.

The canonical separator — if a sampler cannot beat random here, nothing else it does matters (Problem::sphere). The bias amplitude (120, against a true range of ~105) is deliberately large: it puts the among-the-good-configs rank correlation near 0.67, so the cheap evaluations are genuinely informative and genuinely misleading, and no searcher can simply read the answer off the bottom rung.

§Errors

As new; never in practice.

pub fn rugged() -> Result<Self>

The multimodal fixture: a 3-D Rastrigin over the 1 → 9 ladder.

A grid of local minima inside a smooth global bowl (Problem::rastrigin), so the cheap proxy is not merely a shifted bowl but a shifted bowl over a rugged surface — the honest counterpart to bowl.

§Errors

As new; never in practice.

pub fn wide_bowl() -> Result<Self>

The wide-ladder fixture: the same 4-D sphere over 1 → 27, so the cheapest rung costs a twenty-seventh of a full evaluation.

Four fidelities instead of three — a full Hyperband cycle costs 405 units here against 72 on bowl, so the DE sees far fewer generations per unit budget. It exists to show the result is not an artefact of one ladder shape.

§Errors

As new; never in practice.

pub fn name(&self) -> &str

The problem’s label (the wrapped surface’s).

pub const fn schema(&self) -> &SpaceSchema

The declared search space.

pub const fn min_fidelity(&self) -> u64

The cheapest fidelity on the ladder.

pub const fn max_fidelity(&self) -> u64

The full budget — the fidelity at which an observation is exact.

pub fn fidelities(&self) -> Result<Vec<u64>>

The geometric ladder DEHB runs on, [min·η⁰, …, max].

§Errors

As Dehb::new.

pub fn true_value(&self, point: &Assignment) -> f64

The true (full-fidelity) objective at point — the ground truth every report is scored against.

pub fn decay(&self, fidelity: u64) -> f64

How much of the low-fidelity error survives at fidelity b: (b_max/b − 1) / (b_max/b_min − 1), clamped to [0, 1].

1 at the cheapest fidelity, 0 exactly at the full budget, and — being a 1/b curve — mostly burned off one rung below the top. This is the standard shape of a learning curve’s remaining error, which is what a fidelity is.

pub fn observe(&self, point: &Assignment, fidelity: u64, seed: u64) -> f64

What a run of point at fidelity fidelity reports.

f(x) + decay(b)·(bias(x) + noise·wobble): exact at the full budget, biased and wobbly below it. Pure and total — a malformed assignment yields NaN through Problem::eval rather than panicking.

pub fn rank_correlation(&self, fidelity: u64, samples: usize, seed: u64) -> f64

Spearman rank correlation between what a run sees at fidelity and the truth, over samples uniform draws — how informative the cheap proxy is.

1.0 would mean the low fidelity ranks configurations exactly as the full budget does (a fixture that hands multi-fidelity search a free win); 0.0 would mean the cheap evaluations are noise (nothing to exploit). A real problem sits in between, and the oracle pins the band.

pub fn rank_correlation_top( &self, fidelity: u64, samples: usize, seed: u64, fraction: f64, ) -> f64

The same correlation restricted to the best fraction of the sample by true value — how informative the cheap proxy is among configurations that are already good, which is the regime a search spends its budget in.

Always lower than the global rank_correlation: once the true values are close together, the proxy’s displaced bowl dominates the ordering. This is the number that says the fixture is not handing multi-fidelity search a free win.

pub fn dehb(&self, knobs: DeKnobs) -> Result<Dehb>

A Dehb over this problem’s ladder with the given DE knobs.

§Errors

As Dehb::with_eta.

Trait Implementations§

§

impl Clone for MultiFidelity

§

fn clone(&self) -> MultiFidelity

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for MultiFidelity

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ByRef<T> for T

§

fn by_ref(&self) -> &T

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more