pub struct GridSearch {
pub points_per_param: usize,
/* private fields */
}Expand description
Grid search optimizer.
Exhaustively searches all combinations of parameter values. Best for small, discrete search spaces.
§Example
use aprender::automl::{GridSearch, SearchSpace, SearchStrategy};
use aprender::automl::params::RandomForestParam as RF;
let space = SearchSpace::new()
.add(RF::NEstimators, 10..100)
.add(RF::MaxDepth, 2..10);
let mut search = GridSearch::new(5); // 5 points per continuous param
let trials = search.suggest(&space, 100);
// Grid of 5x5 = 25 configurations
assert!(trials.len() <= 25);Fields§
§points_per_param: usizeNumber of grid points per continuous parameter.
Implementations§
Trait Implementations§
Source§impl Clone for GridSearch
impl Clone for GridSearch
Source§fn clone(&self) -> GridSearch
fn clone(&self) -> GridSearch
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GridSearch
impl Debug for GridSearch
Source§impl<P: ParamKey> SearchStrategy<P> for GridSearch
impl<P: ParamKey> SearchStrategy<P> for GridSearch
Auto Trait Implementations§
impl Freeze for GridSearch
impl RefUnwindSafe for GridSearch
impl Send for GridSearch
impl Sync for GridSearch
impl Unpin for GridSearch
impl UnwindSafe for GridSearch
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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