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

Method predict

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

Source from the content-addressed store, hash-verified

9
10impl RegressionPredictor for LinearRegModel {
11 fn predict(&self, x: &[Vec<f64>]) -> Vec<f64> {
12 x.iter().map(|r| r.iter().zip(self.w.iter()).map(|(a, b)| a * b).sum::<f64>()).collect()
13 }
14}
15
16struct NonLinearRegModel;

Calls

no outgoing calls

Tested by

no test coverage detected