pub fn dense_predict(&self, feature_vec: &[f64]) -> f64 {
        let sparse_vec: Vec<(i32, f64)> = feature_vec.iter()
            .filter(|x| **x != 0.0)
            .enumerate()
            .map(|(i, &x)| (i as i32, x))
            .collect();
        self.sparse_predict(&sparse_vec)
    }
/// Do classification or regression on a test dense vector x given a model.
///
/// For a classification model, the predicted class for x is returned. For a regression model,
/// the function value of x calculated using the model is returned. For an one-class model, +1
/// or -1 is returned.
Do classification or regression on a test dense vector x given a model.
For a classification model, the predicted class for x is returned. For a regression model,
the function value of x calculated using the model is returned. For an one-class model, +1
or -1 is returned.
Do classification or regression on a test dense vector x given a model . For a classification model the predicted class for x is returned . For a regression model the function value of x calculated using the model is returned . For an one - class model + 1 or - 1 is returned .
pub fn dense_predict(&self, feature_vec: &[f64]) -> f64 {
        let sparse_vec: Vec<(i32, f64)> = feature_vec.iter()
            .filter(|x| **x != 0.0)
            .enumerate()
            .map(|(i, &x)| (i as i32, x))
            .collect();
        self.sparse_predict(&sparse_vec)
    }
pub fn dense_predict ( & self , feature_vec : & [ f64 ] ) -> f64 { let sparse_vec : Vec < ( i32 , f64 ) > = feature_vec . iter ( ) . filter ( | x | * * x != 0.0 ) . enumerate ( ) . map ( | ( i , & x ) | ( i as i32 , x ) ) . collect ( ) ; self . sparse_predict ( & sparse_vec ) }
Do classification or regression on a test dense vector x given a model.
Do classification or regression on a test dense vector x given a model .
&self
feature_vec
&[f64]
&self
feature_vec
&[f64]