(&self, x: &[Vec<f64>])
| 51 | } |
| 52 | |
| 53 | fn predict_proba(&self, x: &[Vec<f64>]) -> Vec<f64> { |
| 54 | x.iter() |
| 55 | .map(|row| { |
| 56 | let z = row.iter().zip(self.w.iter()).map(|(a, b)| a * b).sum::<f64>() + self.b; |
| 57 | 1.0 / (1.0 + (-z).exp()) |
| 58 | }) |
| 59 | .collect() |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | /// `(x, y, feature_names, cv_splits)`. |
nothing calls this directly
no outgoing calls
no test coverage detected