pub enum SplitQuality {
Gini,
Entropy,
}
Expand description
The metric used to determine the feature by which a node is split
Variants§
Gini
Measures the degree of probability of a randomly chosen point in the subtree being misclassified, defined as one minus the sum over all labels of the squared probability of encountering that label. The Gini index of the root is given by the weighted sum of the indexes of its two subtrees. At each step the split is applied to the feature which decreases the most the Gini impurity of the root.
Entropy
Measures the entropy of a subtree, defined as the sum over all labels of the probability of encountering that label in the subtree times its logarithm in base two, with negative sign. The entropy of the root minus the weighted sum of the entropy of its two subtrees defines the “information gain” obtained by applying the split. At each step the split is applied to the feature with the biggest information gain
Trait Implementations§
Source§impl Clone for SplitQuality
impl Clone for SplitQuality
Source§fn clone(&self) -> SplitQuality
fn clone(&self) -> SplitQuality
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SplitQuality
impl Debug for SplitQuality
Source§impl Hash for SplitQuality
impl Hash for SplitQuality
Source§impl PartialEq for SplitQuality
impl PartialEq for SplitQuality
impl Copy for SplitQuality
impl Eq for SplitQuality
impl StructuralPartialEq for SplitQuality
Auto Trait Implementations§
impl Freeze for SplitQuality
impl RefUnwindSafe for SplitQuality
impl Send for SplitQuality
impl Sync for SplitQuality
impl Unpin for SplitQuality
impl UnwindSafe for SplitQuality
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.