MCPcopy Create free account
hub / github.com/Open-Quant/openquant / predict_proba

Method predict_proba

crates/openquant/tests/feature_importance.rs:53–60  ·  view source on GitHub ↗
(&self, x: &[Vec<f64>])

Source from the content-addressed store, hash-verified

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)`.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected