pub struct BayesSearchCV { /* private fields */ }Expand description
Bayesian Search Cross-Validator
Implementations§
Source§impl BayesSearchCV
impl BayesSearchCV
Sourcepub fn new(param_distributions: HashMap<String, ParamDistribution>) -> Self
pub fn new(param_distributions: HashMap<String, ParamDistribution>) -> Self
Create a new Bayesian search cross-validator
Sourcepub fn n_initial_points(self, n_initial_points: usize) -> Self
pub fn n_initial_points(self, n_initial_points: usize) -> Self
Set the number of initial random samples
Sourcepub fn acquisition(self, acquisition: AcquisitionFunction) -> Self
pub fn acquisition(self, acquisition: AcquisitionFunction) -> Self
Set the acquisition function
Sourcepub fn random_state(self, random_state: u64) -> Self
pub fn random_state(self, random_state: u64) -> Self
Set the random state
Sourcepub fn search<E, CV, F>(
&mut self,
estimator: E,
x: &Array2<Float>,
y: &Array1<i32>,
cv: CV,
scoring: F,
) -> Result<()>
pub fn search<E, CV, F>( &mut self, estimator: E, x: &Array2<Float>, y: &Array1<i32>, cv: CV, scoring: F, ) -> Result<()>
Perform Bayesian hyperparameter search
Sourcepub fn best_score(&self) -> Option<Float>
pub fn best_score(&self) -> Option<Float>
Get the best score found
Sourcepub fn evaluations(&self) -> &[EvaluationPoint]
pub fn evaluations(&self) -> &[EvaluationPoint]
Get all evaluations
Auto Trait Implementations§
impl Freeze for BayesSearchCV
impl RefUnwindSafe for BayesSearchCV
impl Send for BayesSearchCV
impl Sync for BayesSearchCV
impl Unpin for BayesSearchCV
impl UnwindSafe for BayesSearchCV
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 more