Enum LearningCurve
pub enum LearningCurve {
Saturating {
asymptote: f64,
rate: f64,
floor: f64,
noise: f64,
},
Table {
points: Vec<(u64, f64)>,
},
}Expand description
A synthetic learning curve: a deterministic value at each resource step.
Build one with a named constructor and read it with
value_at. Every constructor is const-friendly
data, and the value is a pure function of the step (and, for the noisy
family, a seed), so a curve is trivially reproducible and cheap to evaluate
inside the objective’s inner loop.
Variants§
Saturating
The monotone-saturating trend floor + (asymptote − floor)·(1 − e^(−rate·t)),
plus deterministic noise of amplitude noise (zero for a smooth curve).
rate controls how fast the curve approaches asymptote: large rate
saturates almost immediately (a fast learner), small rate climbs slowly
(a slow starter). With asymptote == floor the trend is flat at that
level, which — with a non-zero noise — is a pure-noise curve.
Fields
Table
An explicit (step, value) table — the most knowable curve of all, for
hand-verified oracle scenarios.
The points must be in ascending step order. A query lands on the value of
the largest listed step that is <= step (a right-continuous step
function); a query below the first listed step returns the first value;
an empty table is NaN everywhere.
Implementations§
§impl LearningCurve
impl LearningCurve
pub const fn saturating(asymptote: f64, rate: f64) -> Self
pub const fn saturating(asymptote: f64, rate: f64) -> Self
A smooth monotone-saturating curve rising from 0 toward asymptote.
pub const fn noisy(asymptote: f64, rate: f64, noise: f64) -> Self
pub const fn noisy(asymptote: f64, rate: f64, noise: f64) -> Self
A saturating trend with a bounded deterministic wobble of amplitude
noise (in the same units as the value).
pub const fn noisy_flat(level: f64, noise: f64) -> Self
pub const fn noisy_flat(level: f64, noise: f64) -> Self
A flat trend at level plus deterministic noise of amplitude noise.
A set of these with distinct per-trial seeds differs only by its noise — the fixture the variance-aware pruner must not prune.
pub const fn deceptive(plateau: f64) -> Self
pub const fn deceptive(plateau: f64) -> Self
The deceptive family: rises fast (high rate) to a low plateau.
Best early, mediocre late — the shape a myopic pruner is tempted to
promote and a good one eventually catches once the late bloomers overtake
it. A convenience wrapper over saturating.
pub const fn slow_starter(asymptote: f64) -> Self
pub const fn slow_starter(asymptote: f64) -> Self
The slow-starter family: rises slowly (low rate) to a high
asymptote.
Worst early, best late — the trial a pruner must not cut so long as it is above the pruning bar at the rungs it passes.
Trait Implementations§
§impl Clone for LearningCurve
impl Clone for LearningCurve
§fn clone(&self) -> LearningCurve
fn clone(&self) -> LearningCurve
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for LearningCurve
impl Debug for LearningCurve
§impl PartialEq for LearningCurve
impl PartialEq for LearningCurve
impl StructuralPartialEq for LearningCurve
Auto Trait Implementations§
impl Freeze for LearningCurve
impl RefUnwindSafe for LearningCurve
impl Send for LearningCurve
impl Sync for LearningCurve
impl Unpin for LearningCurve
impl UnsafeUnpin for LearningCurve
impl UnwindSafe for LearningCurve
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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