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

Method predict

crates/openquant/src/cross_validation.rs:7–9  ·  view source on GitHub ↗
(&self, x: &[Vec<f64>])

Source from the content-addressed store, hash-verified

5 fn fit(&mut self, x: &[Vec<f64>], y: &[f64], sample_weight: Option<&[f64]>);
6 fn predict_proba(&self, x: &[Vec<f64>]) -> Vec<f64>;
7 fn predict(&self, x: &[Vec<f64>]) -> Vec<f64> {
8 self.predict_proba(x).into_iter().map(|p| if p >= 0.5 { 1.0 } else { 0.0 }).collect()
9 }
10}
11
12#[derive(Clone, Copy)]

Callers

nothing calls this directly

Implementers 3

hyperparameter_tuning.rscrates/openquant/tests/hyperparameter_
feature_importance.rscrates/openquant/tests/feature_importa
cross_validation.rscrates/openquant/tests/cross_validatio

Calls 1

predict_probaMethod · 0.45

Tested by

no test coverage detected