pub struct FittedBaggingClassifier<F: Float> { /* private fields */ }Expand description
Fitted bagging classifier.
Implementations§
Source§impl<F: Float> FittedBaggingClassifier<F>
impl<F: Float> FittedBaggingClassifier<F>
Sourcepub fn feature_importances(&self) -> Array1<F>
pub fn feature_importances(&self) -> Array1<F>
Feature importances averaged across all trees and normalized to sum to 1.
Sourcepub fn n_estimators(&self) -> usize
pub fn n_estimators(&self) -> usize
Number of trees in the ensemble.
Sourcepub fn predict_proba(&self, x: &Array2<F>) -> Result<Array2<F>>
pub fn predict_proba(&self, x: &Array2<F>) -> Result<Array2<F>>
Predict class probabilities for each sample.
Returns an Array2<F> of shape (n_samples, n_classes) where each row
sums to 1.0. Probabilities are averaged across all trees in the ensemble.
Trait Implementations§
Source§impl<F: Clone + Float> Clone for FittedBaggingClassifier<F>
impl<F: Clone + Float> Clone for FittedBaggingClassifier<F>
Source§fn clone(&self) -> FittedBaggingClassifier<F>
fn clone(&self) -> FittedBaggingClassifier<F>
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 moreSource§impl<'de, F> Deserialize<'de> for FittedBaggingClassifier<F>where
F: DeserializeOwned + Float,
impl<'de, F> Deserialize<'de> for FittedBaggingClassifier<F>where
F: DeserializeOwned + Float,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<F: Float> Predict<F> for FittedBaggingClassifier<F>
impl<F: Float> Predict<F> for FittedBaggingClassifier<F>
Source§impl<F: Float> PredictProba<F> for FittedBaggingClassifier<F>
impl<F: Float> PredictProba<F> for FittedBaggingClassifier<F>
Auto Trait Implementations§
impl<F> Freeze for FittedBaggingClassifier<F>
impl<F> RefUnwindSafe for FittedBaggingClassifier<F>where
F: RefUnwindSafe,
impl<F> Send for FittedBaggingClassifier<F>
impl<F> Sync for FittedBaggingClassifier<F>
impl<F> Unpin for FittedBaggingClassifier<F>where
F: Unpin,
impl<F> UnsafeUnpin for FittedBaggingClassifier<F>
impl<F> UnwindSafe for FittedBaggingClassifier<F>where
F: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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