pub struct RandomForestClassifier {
pub n_estimators: usize,
pub max_depth: Option<usize>,
pub min_samples_split: usize,
pub min_samples_leaf: usize,
pub max_features: Option<usize>,
pub bootstrap: bool,
pub n_jobs: Option<usize>,
/* private fields */
}Expand description
Random Forest Classifier
Fields§
§n_estimators: usize§max_depth: Option<usize>§min_samples_split: usize§min_samples_leaf: usize§max_features: Option<usize>§bootstrap: bool§n_jobs: Option<usize>Implementations§
Source§impl RandomForestClassifier
impl RandomForestClassifier
pub fn new(n_estimators: usize) -> Self
pub fn max_depth(self, depth: usize) -> Self
pub fn min_samples_split(self, n: usize) -> Self
pub fn max_features(self, n: usize) -> Self
pub fn fit(&mut self, x: &Tensor, y: &Tensor)
pub fn predict(&self, x: &Tensor) -> Tensor
pub fn predict_proba(&self, x: &Tensor) -> Tensor
Sourcepub fn feature_importances(&self, n_features: usize) -> Vec<f32>
pub fn feature_importances(&self, n_features: usize) -> Vec<f32>
Feature importance based on impurity decrease
Auto Trait Implementations§
impl Freeze for RandomForestClassifier
impl RefUnwindSafe for RandomForestClassifier
impl Send for RandomForestClassifier
impl Sync for RandomForestClassifier
impl Unpin for RandomForestClassifier
impl UnwindSafe for RandomForestClassifier
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