pub struct RandomizedSearchCV {
pub param_distributions: HashMap<String, ParamDistribution>,
pub n_iter: usize,
pub cv: usize,
pub scoring: Scoring,
pub random_state: Option<u64>,
pub refit: bool,
pub n_jobs: usize,
/* private fields */
}Expand description
Randomized Search Cross-Validation
Fields§
§param_distributions: HashMap<String, ParamDistribution>§n_iter: usize§cv: usize§scoring: Scoring§random_state: Option<u64>§refit: bool§n_jobs: usizeImplementations§
Source§impl RandomizedSearchCV
impl RandomizedSearchCV
pub fn new( param_distributions: HashMap<String, ParamDistribution>, n_iter: usize, ) -> Self
pub fn cv(self, cv: usize) -> Self
pub fn scoring(self, s: Scoring) -> Self
pub fn random_state(self, seed: u64) -> Self
Sourcepub fn search<F>(
&mut self,
x: &Tensor,
y: &Tensor,
fit_and_score: F,
) -> RandomizedSearchResult
pub fn search<F>( &mut self, x: &Tensor, y: &Tensor, fit_and_score: F, ) -> RandomizedSearchResult
Run randomized search with a generic model Returns the best parameters found
pub fn best_params(&self) -> Option<&HashMap<String, f32>>
pub fn best_score(&self) -> f32
pub fn cv_results(&self) -> &[CVResult]
Auto Trait Implementations§
impl Freeze for RandomizedSearchCV
impl RefUnwindSafe for RandomizedSearchCV
impl Send for RandomizedSearchCV
impl Sync for RandomizedSearchCV
impl Unpin for RandomizedSearchCV
impl UnwindSafe for RandomizedSearchCV
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