pub fn fold(&self, init: f64, f: impl Fn(f64, &f64) -> f64) -> f64 {
        apply_to_features!(self => ref da, {
            da.iter().fold(init, f)
        }; ref sa, {
            sa.activations.values().fold(init, f)
        })
    }
/// Perform a fold operation over the feature activations.
///
/// __Note:__ for sparse features this method will ignore zeroes.
Perform a fold operation over the feature activations.
Note:__ for sparse features this method will ignore zeroes.
Perform a fold operation over the feature activations . Note : __ for sparse features this method will ignore zeroes .
pub fn fold(&self, init: f64, f: impl Fn(f64, &f64) -> f64) -> f64 {
        apply_to_features!(self => ref da, {
            da.iter().fold(init, f)
        }; ref sa, {
            sa.activations.values().fold(init, f)
        })
    }
pub fn fold ( & self , init : f64 , f : impl Fn ( f64 , & f64 ) -> f64 ) -> f64 { apply_to_features ! ( self ref da { da iter ( ) fold ( init f ) } ref sa { sa activations values ( ) fold ( init f ) } ) }
Perform a fold operation over the feature activations.
Perform a fold operation over the feature activations .
&self
init
f64
f
impl Fn(f64, &f64) -> f64
&self
init
f64
f
impl Fn(f64, &f64) -> f64