pub struct SearchEngine { /* private fields */ }Expand description
The search engine: combines Sobol initial design with k-NN + EI Bayesian optimization.
Implementations§
Source§impl SearchEngine
impl SearchEngine
pub fn new(space: ConfigurationSpace, budget: usize) -> Self
Sourcepub fn best_value(&self) -> f64
pub fn best_value(&self) -> f64
Best objective value seen.
Sourcepub fn ask(&mut self) -> Option<Configuration>
pub fn ask(&mut self) -> Option<Configuration>
Ask for the next configuration to try.
Returns None if the budget is exhausted.
Sourcepub fn tell(&mut self, cfg: &Configuration, result: &ExperimentResult)
pub fn tell(&mut self, cfg: &Configuration, result: &ExperimentResult)
Tell the engine the result of an experiment.
Sourcepub fn surrogate_add(
&mut self,
normalized: Vec<f64>,
objective: f64,
config_hash: u64,
)
pub fn surrogate_add( &mut self, normalized: Vec<f64>, objective: f64, config_hash: u64, )
Directly add an observation to the surrogate (for resuming from a log). The normalized vector and config hash must be pre-computed.
Sourcepub fn best_config(&self) -> Option<u64>
pub fn best_config(&self) -> Option<u64>
Get the best configuration found so far (by scalar objective).
Auto Trait Implementations§
impl Freeze for SearchEngine
impl RefUnwindSafe for SearchEngine
impl Send for SearchEngine
impl Sync for SearchEngine
impl Unpin for SearchEngine
impl UnsafeUnpin for SearchEngine
impl UnwindSafe for SearchEngine
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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 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>
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