Trait Metric

Source
pub trait Metric<F: Float> {
    // Required method
    fn compute(
        &self,
        predictions: &Array<F, IxDyn>,
        targets: &Array<F, IxDyn>,
    ) -> Result<F>;
}
Expand description

Trait for metrics that evaluate model performance

Required Methods§

Source

fn compute( &self, predictions: &Array<F, IxDyn>, targets: &Array<F, IxDyn>, ) -> Result<F>

Compute the metric for the given predictions and targets

Implementors§