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

Method predict_proba

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

Source from the content-addressed store, hash-verified

25
26impl ClassificationPredictor for NonLinearClsModel {
27 fn predict_proba(&self, x: &[Vec<f64>]) -> Vec<f64> {
28 x.iter()
29 .map(|r| {
30 let z = 1.5 * r[0] + 0.8 * r[1] * r[1] + 0.5 * r[0] * r[2] - 0.2 * r[3];
31 1.0 / (1.0 + (-z).exp())
32 })
33 .collect()
34 }
35}
36
37fn synthetic_x(n: usize, p: usize) -> Vec<Vec<f64>> {

Callers 5

evaluate_paramsFunction · 0.45
score_modelFunction · 0.45
fitMethod · 0.45
predictMethod · 0.45
ml_cross_val_scoreFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected