pub struct MultiLayerStackingClassifier<State = Untrained> { /* private fields */ }Expand description
Multi-Layer Stacking Classifier
Implements deep stacking with multiple layers, advanced meta-learning strategies, and ensemble selection techniques for improved prediction accuracy.
Implementations§
Source§impl MultiLayerStackingClassifier<Untrained>
impl MultiLayerStackingClassifier<Untrained>
Sourcepub fn new(config: MultiLayerStackingConfig) -> Self
pub fn new(config: MultiLayerStackingConfig) -> Self
Create a new multi-layer stacking classifier
Sourcepub fn two_layer(base_estimators: usize, meta_estimators: usize) -> Self
pub fn two_layer(base_estimators: usize, meta_estimators: usize) -> Self
Create a simple two-layer stacking classifier
Sourcepub fn deep(n_layers: usize, estimators_per_layer: usize) -> Self
pub fn deep(n_layers: usize, estimators_per_layer: usize) -> Self
Create a deep stacking classifier with multiple layers
Sourcepub fn random_state(self, seed: u64) -> Self
pub fn random_state(self, seed: u64) -> Self
Set random state for reproducibility
Source§impl MultiLayerStackingClassifier<Trained>
impl MultiLayerStackingClassifier<Trained>
Sourcepub fn predict_proba(&self, x: &Array2<Float>) -> Result<Array2<Float>>
pub fn predict_proba(&self, x: &Array2<Float>) -> Result<Array2<Float>>
Predict class probabilities using the trained multi-layer stacking model
Sourcepub fn get_layer_feature_importances(&self) -> Option<&Vec<Array1<Float>>>
pub fn get_layer_feature_importances(&self) -> Option<&Vec<Array1<Float>>>
Get feature importances for each layer
Sourcepub fn get_diversity_scores(&self) -> Option<&Array1<Float>>
pub fn get_diversity_scores(&self) -> Option<&Array1<Float>>
Get diversity scores for the final layer
Sourcepub fn n_features_in(&self) -> usize
pub fn n_features_in(&self) -> usize
Get the number of input features
Sourcepub fn config(&self) -> &MultiLayerStackingConfig
pub fn config(&self) -> &MultiLayerStackingConfig
Get the configuration
Sourcepub fn layers(&self) -> Option<&Vec<StackingLayer>>
pub fn layers(&self) -> Option<&Vec<StackingLayer>>
Get the layers
Trait Implementations§
Source§impl<State: Debug> Debug for MultiLayerStackingClassifier<State>
impl<State: Debug> Debug for MultiLayerStackingClassifier<State>
Source§impl Fit<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<i32>, Dim<[usize; 1]>>> for MultiLayerStackingClassifier<Untrained>
impl Fit<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<i32>, Dim<[usize; 1]>>> for MultiLayerStackingClassifier<Untrained>
Source§type Fitted = MultiLayerStackingClassifier<Trained>
type Fitted = MultiLayerStackingClassifier<Trained>
The fitted model type
Source§fn fit(self, x: &Array2<Float>, y: &Array1<i32>) -> Result<Self::Fitted>
fn fit(self, x: &Array2<Float>, y: &Array1<i32>) -> Result<Self::Fitted>
Fit the model to the provided data with validation
Source§fn fit_with_validation(
self,
x: &X,
y: &Y,
_x_val: Option<&X>,
_y_val: Option<&Y>,
) -> Result<(Self::Fitted, FitMetrics), SklearsError>where
Self: Sized,
fn fit_with_validation(
self,
x: &X,
y: &Y,
_x_val: Option<&X>,
_y_val: Option<&Y>,
) -> Result<(Self::Fitted, FitMetrics), SklearsError>where
Self: Sized,
Fit with custom validation and early stopping
Source§impl Predict<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<i32>, Dim<[usize; 1]>>> for MultiLayerStackingClassifier<Trained>
impl Predict<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<i32>, Dim<[usize; 1]>>> for MultiLayerStackingClassifier<Trained>
Source§fn predict(&self, x: &Array2<Float>) -> Result<Array1<i32>>
fn predict(&self, x: &Array2<Float>) -> Result<Array1<i32>>
Make predictions on the provided data
Source§fn predict_with_uncertainty(
&self,
x: &X,
) -> Result<(Output, UncertaintyMeasure), SklearsError>
fn predict_with_uncertainty( &self, x: &X, ) -> Result<(Output, UncertaintyMeasure), SklearsError>
Make predictions with confidence intervals
Auto Trait Implementations§
impl<State> Freeze for MultiLayerStackingClassifier<State>
impl<State> RefUnwindSafe for MultiLayerStackingClassifier<State>where
State: RefUnwindSafe,
impl<State> Send for MultiLayerStackingClassifier<State>where
State: Send,
impl<State> Sync for MultiLayerStackingClassifier<State>where
State: Sync,
impl<State> Unpin for MultiLayerStackingClassifier<State>where
State: Unpin,
impl<State> UnwindSafe for MultiLayerStackingClassifier<State>where
State: 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