pub struct StackingEnsemble<M: Model, Meta: Model> { /* private fields */ }Expand description
Stacking ensemble with a meta-learner.
Uses base models’ predictions as features for a meta-model.
Implementations§
Source§impl<M: Model, Meta: Model> StackingEnsemble<M, Meta>
impl<M: Model, Meta: Model> StackingEnsemble<M, Meta>
Sourcepub fn new(base_models: Vec<M>, meta_model: Meta) -> TrainResult<Self>
pub fn new(base_models: Vec<M>, meta_model: Meta) -> TrainResult<Self>
Create a new stacking ensemble.
§Arguments
base_models- First-level base modelsmeta_model- Second-level meta-learner
Sourcepub fn generate_meta_features(
&self,
input: &Array2<f64>,
) -> TrainResult<Array2<f64>>
pub fn generate_meta_features( &self, input: &Array2<f64>, ) -> TrainResult<Array2<f64>>
Trait Implementations§
Auto Trait Implementations§
impl<M, Meta> Freeze for StackingEnsemble<M, Meta>where
Meta: Freeze,
impl<M, Meta> RefUnwindSafe for StackingEnsemble<M, Meta>where
Meta: RefUnwindSafe,
M: RefUnwindSafe,
impl<M, Meta> Send for StackingEnsemble<M, Meta>
impl<M, Meta> Sync for StackingEnsemble<M, Meta>
impl<M, Meta> Unpin for StackingEnsemble<M, Meta>
impl<M, Meta> UnwindSafe for StackingEnsemble<M, Meta>where
Meta: UnwindSafe,
M: 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 more