pub struct HyperparameterOptimizer<F: Float + Debug + ScalarOperand> { /* private fields */ }Expand description
Hyperparameter Optimization Framework
Implementations§
Source§impl<F: Float + Debug + Clone + FromPrimitive + ScalarOperand> HyperparameterOptimizer<F>
impl<F: Float + Debug + Clone + FromPrimitive + ScalarOperand> HyperparameterOptimizer<F>
Sourcepub fn new(
method: OptimizationMethod,
search_space: SearchSpace<F>,
max_trials: usize,
) -> Self
pub fn new( method: OptimizationMethod, search_space: SearchSpace<F>, max_trials: usize, ) -> Self
Create new hyperparameter optimizer
Sourcepub fn optimize<ModelFn>(
&mut self,
objectivefn: ModelFn,
) -> Result<HyperparameterSet<F>>
pub fn optimize<ModelFn>( &mut self, objectivefn: ModelFn, ) -> Result<HyperparameterSet<F>>
Run hyperparameter optimization
Sourcepub fn get_results(&self) -> OptimizationResults<F>
pub fn get_results(&self) -> OptimizationResults<F>
Get optimization results
Sourcepub fn best_params(&self) -> Option<&HyperparameterSet<F>>
pub fn best_params(&self) -> Option<&HyperparameterSet<F>>
Get the current best parameters
Sourcepub fn best_score(&self) -> Option<F>
pub fn best_score(&self) -> Option<F>
Get the current best score
Sourcepub fn history(&self) -> &[OptimizationStep<F>]
pub fn history(&self) -> &[OptimizationStep<F>]
Get the optimization history
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for HyperparameterOptimizer<F>where
F: Freeze,
impl<F> RefUnwindSafe for HyperparameterOptimizer<F>where
F: RefUnwindSafe,
impl<F> Send for HyperparameterOptimizer<F>where
F: Send,
impl<F> Sync for HyperparameterOptimizer<F>where
F: Sync,
impl<F> Unpin for HyperparameterOptimizer<F>where
F: Unpin,
impl<F> UnwindSafe for HyperparameterOptimizer<F>where
F: UnwindSafe,
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.