Enum linfa_trees::SplitQuality
source · [−]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
sourceimpl Clone for SplitQuality
impl Clone for SplitQuality
sourcefn clone(&self) -> SplitQuality
fn clone(&self) -> SplitQuality
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SplitQuality
impl Debug for SplitQuality
impl Copy for SplitQuality
Auto Trait Implementations
impl RefUnwindSafe for SplitQuality
impl Send for SplitQuality
impl Sync for SplitQuality
impl Unpin for SplitQuality
impl UnwindSafe for SplitQuality
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more