Struct Belief
pub struct Belief { /* private fields */ }Expand description
A Gaussian process fitted to a run’s completed trials.
Implementations§
§impl Belief
impl Belief
pub fn new(controller: &Controller) -> Option<Self>
pub fn new(controller: &Controller) -> Option<Self>
Fits the model to controller’s completed trials, or returns None
with fewer than MIN_POINTS of them or a fit that fails.
The training data is GP-EI’s: every completed trial with a finite
value and both parameters, in trial-number order, mapped into the unit
square through the declared space, capped at the newest
[MAX_TRAIN]. For CARBS’s two-objective study the value is the first
objective.
pub fn new_with_training_data(
inputs: &[Vec<f64>],
targets: &[f64],
) -> Option<Self>
pub fn new_with_training_data( inputs: &[Vec<f64>], targets: &[f64], ) -> Option<Self>
Fits GP-EI’s collected training pairs without accessing a controller.
Returns None for fewer than MIN_POINTS, mismatched lengths, or
a failed fit. Inputs must be unit-square points.
pub const fn lengthscale(&self) -> f64
pub const fn lengthscale(&self) -> f64
The kernel lengthscale, in unit-square units.
pub fn predict(&self, unit: [f64; 2]) -> (f64, f64)
pub fn predict(&self, unit: [f64; 2]) -> (f64, f64)
The posterior mean and standard deviation at a unit-square point, in the function’s units.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Belief
impl RefUnwindSafe for Belief
impl Send for Belief
impl Sync for Belief
impl Unpin for Belief
impl UnsafeUnpin for Belief
impl UnwindSafe for Belief
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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