MLCostModel

Trait MLCostModel 

Source
pub trait MLCostModel {
    // Required methods
    fn predict(&self, features: &Array1<f64>) -> DeviceResult<f64>;
    fn train(
        &mut self,
        features: &Array2<f64>,
        targets: &Array1<f64>,
    ) -> DeviceResult<()>;
    fn get_feature_importance(&self) -> DeviceResult<Array1<f64>>;
}
Expand description

Machine learning cost model trait

Required Methods§

Source

fn predict(&self, features: &Array1<f64>) -> DeviceResult<f64>

Source

fn train( &mut self, features: &Array2<f64>, targets: &Array1<f64>, ) -> DeviceResult<()>

Source

fn get_feature_importance(&self) -> DeviceResult<Array1<f64>>

Implementors§