pub struct TPESampler { /* private fields */ }Expand description
Tree-structured Parzen Estimator (TPE) sampler This is a simplified version of the TPE algorithm used in Optuna
Implementations§
Source§impl TPESampler
impl TPESampler
Sourcepub fn with_config(config: SamplerConfig) -> Self
pub fn with_config(config: SamplerConfig) -> Self
Create a TPE sampler with configuration
Trait Implementations§
Source§impl Default for TPESampler
impl Default for TPESampler
Source§impl Sampler for TPESampler
impl Sampler for TPESampler
Source§fn sample(
&mut self,
search_space: &SearchSpace,
trial_history: &TrialHistory,
) -> HashMap<String, ParameterValue>
fn sample( &mut self, search_space: &SearchSpace, trial_history: &TrialHistory, ) -> HashMap<String, ParameterValue>
Sample a new configuration given the search space and trial history
Auto Trait Implementations§
impl Freeze for TPESampler
impl RefUnwindSafe for TPESampler
impl Send for TPESampler
impl Sync for TPESampler
impl Unpin for TPESampler
impl UnsafeUnpin for TPESampler
impl UnwindSafe for TPESampler
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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