pub struct BlendingClassifier<State = Untrained> { /* private fields */ }Expand description
Blending Classifier
Uses a holdout validation approach to train base estimators on part of the data and generate meta-features on the remaining data for training a meta-learner.
Implementations§
Source§impl BlendingClassifier<Untrained>
impl BlendingClassifier<Untrained>
Sourcepub fn holdout_ratio(self, ratio: f64) -> Self
pub fn holdout_ratio(self, ratio: f64) -> Self
Set the holdout ratio for validation set
Sourcepub fn random_state(self, random_state: u64) -> Self
pub fn random_state(self, random_state: u64) -> Self
Set the random state for reproducibility
Source§impl BlendingClassifier<Trained>
impl BlendingClassifier<Trained>
Sourcepub fn n_features_in(&self) -> usize
pub fn n_features_in(&self) -> usize
Get the number of features in the training data
Sourcepub fn n_base_estimators(&self) -> usize
pub fn n_base_estimators(&self) -> usize
Get the number of base estimators
Sourcepub fn holdout_ratio(&self) -> f64
pub fn holdout_ratio(&self) -> f64
Get the holdout ratio used for validation
Sourcepub fn random_state(&self) -> Option<u64>
pub fn random_state(&self) -> Option<u64>
Get the random state used for reproducibility
Trait Implementations§
Source§impl<State: Debug> Debug for BlendingClassifier<State>
impl<State: Debug> Debug for BlendingClassifier<State>
Source§impl Fit<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<i32>, Dim<[usize; 1]>>> for BlendingClassifier<Untrained>
impl Fit<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<i32>, Dim<[usize; 1]>>> for BlendingClassifier<Untrained>
Source§type Fitted = BlendingClassifier<Trained>
type Fitted = BlendingClassifier<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 BlendingClassifier<Trained>
impl Predict<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<i32>, Dim<[usize; 1]>>> for BlendingClassifier<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 BlendingClassifier<State>
impl<State> RefUnwindSafe for BlendingClassifier<State>where
State: RefUnwindSafe,
impl<State> Send for BlendingClassifier<State>where
State: Send,
impl<State> Sync for BlendingClassifier<State>where
State: Sync,
impl<State> Unpin for BlendingClassifier<State>where
State: Unpin,
impl<State> UnwindSafe for BlendingClassifier<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