[][src]Struct tensorflow_proto::tensorflow::tensorforest::GiniStats

pub struct GiniStats {
    pub square: f32,
}

Fields

square: f32

This allows us to quickly track and calculate impurity (classification) by storing the sum of input weights and the sum of the squares of the input weights. Weighted gini is then: 1 - (square / sum * sum). Updates to these numbers are: old_i = leaf->value(label) new_i = old_i + incoming_weight sum -> sum + incoming_weight square -> square - (old_i ^ 2) + (new_i ^ 2) total_left_sum -> total_left_sum - old_left_i * old_total_i + new_left_i * new_total_i

Trait Implementations

impl Clone for GiniStats[src]

impl Debug for GiniStats[src]

impl Default for GiniStats[src]

impl Message for GiniStats[src]

impl PartialEq<GiniStats> for GiniStats[src]

impl StructuralPartialEq for GiniStats[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.