pub struct EnsembleLearnerParams<P, R>(/* private fields */);Expand description
A helper struct for building a set of Ensemble Learner hyper-parameters.
Implementations§
Source§impl<P> EnsembleLearnerParams<P, ThreadRng>
impl<P> EnsembleLearnerParams<P, ThreadRng>
pub fn new(model_params: P) -> EnsembleLearnerParams<P, ThreadRng>
Source§impl<P, R: Rng + Clone> EnsembleLearnerParams<P, R>
impl<P, R: Rng + Clone> EnsembleLearnerParams<P, R>
pub fn new_fixed_rng(model_params: P, rng: R) -> EnsembleLearnerParams<P, R>
Sourcepub fn ensemble_size(self, size: usize) -> Self
pub fn ensemble_size(self, size: usize) -> Self
Specifies the number of models to fit in the ensemble.
Sourcepub fn bootstrap_proportion(self, proportion: f64) -> Self
pub fn bootstrap_proportion(self, proportion: f64) -> Self
Sets the proportion of the total number of training samples that should be given to each model for training
Note that the proportion should be in the interval (0, 1] in order to pass the
parameter validation check.
Sourcepub fn feature_proportion(self, proportion: f64) -> Self
pub fn feature_proportion(self, proportion: f64) -> Self
Sets the proportion of the total number of training features that should be given to each model for training
Note that the proportion should be in the interval (0, 1] in order to pass the
parameter validation check.
Trait Implementations§
Source§impl<P: Clone, R: Clone> Clone for EnsembleLearnerParams<P, R>
impl<P: Clone, R: Clone> Clone for EnsembleLearnerParams<P, R>
Source§fn clone(&self) -> EnsembleLearnerParams<P, R>
fn clone(&self) -> EnsembleLearnerParams<P, R>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<P: Copy, R: Copy> Copy for EnsembleLearnerParams<P, R>
Source§impl<P, R> ParamGuard for EnsembleLearnerParams<P, R>
impl<P, R> ParamGuard for EnsembleLearnerParams<P, R>
Source§type Checked = EnsembleLearnerValidParams<P, R>
type Checked = EnsembleLearnerValidParams<P, R>
The checked hyperparameters
Source§fn check_ref(&self) -> Result<&Self::Checked>
fn check_ref(&self) -> Result<&Self::Checked>
Checks the hyperparameters and returns a reference to the checked hyperparameters if
successful
Source§fn check(self) -> Result<Self::Checked>
fn check(self) -> Result<Self::Checked>
Checks the hyperparameters and returns the checked hyperparameters if successful
Source§fn check_unwrap(self) -> Self::Checkedwhere
Self: Sized,
fn check_unwrap(self) -> Self::Checkedwhere
Self: Sized,
Calls
check() and unwraps the resultSource§impl<P: PartialEq, R: PartialEq> PartialEq for EnsembleLearnerParams<P, R>
impl<P: PartialEq, R: PartialEq> PartialEq for EnsembleLearnerParams<P, R>
Source§fn eq(&self, other: &EnsembleLearnerParams<P, R>) -> bool
fn eq(&self, other: &EnsembleLearnerParams<P, R>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<P, R> StructuralPartialEq for EnsembleLearnerParams<P, R>
Auto Trait Implementations§
impl<P, R> Freeze for EnsembleLearnerParams<P, R>
impl<P, R> RefUnwindSafe for EnsembleLearnerParams<P, R>where
P: RefUnwindSafe,
R: RefUnwindSafe,
impl<P, R> Send for EnsembleLearnerParams<P, R>
impl<P, R> Sync for EnsembleLearnerParams<P, R>
impl<P, R> Unpin for EnsembleLearnerParams<P, R>
impl<P, R> UnsafeUnpin for EnsembleLearnerParams<P, R>where
P: UnsafeUnpin,
R: UnsafeUnpin,
impl<P, R> UnwindSafe for EnsembleLearnerParams<P, R>where
P: UnwindSafe,
R: 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> 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