pub struct DecisionTreeClassifier {
pub max_depth: Option<usize>,
pub min_samples_split: usize,
pub min_samples_leaf: usize,
pub max_features: Option<usize>,
pub criterion: Criterion,
/* private fields */
}Expand description
Decision Tree Classifier using CART algorithm
Fields§
§max_depth: Option<usize>Maximum depth of tree
min_samples_split: usizeMinimum samples to split
min_samples_leaf: usizeMinimum samples in leaf
max_features: Option<usize>Maximum features to consider
criterion: CriterionSplit criterion
Implementations§
Source§impl DecisionTreeClassifier
impl DecisionTreeClassifier
pub fn new() -> Self
pub fn max_depth(self, depth: usize) -> Self
pub fn min_samples_split(self, n: usize) -> Self
pub fn min_samples_leaf(self, n: usize) -> Self
pub fn criterion(self, criterion: Criterion) -> Self
Sourcepub fn predict_proba(&self, x: &Tensor) -> Tensor
pub fn predict_proba(&self, x: &Tensor) -> Tensor
Predict class probabilities
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DecisionTreeClassifier
impl RefUnwindSafe for DecisionTreeClassifier
impl Send for DecisionTreeClassifier
impl Sync for DecisionTreeClassifier
impl Unpin for DecisionTreeClassifier
impl UnwindSafe for DecisionTreeClassifier
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