MetricComputation

Trait MetricComputation 

Source
pub trait MetricComputation<F: Float + Debug + Display> {
    // Required methods
    fn compute(
        &self,
        predictions: &Array<F, IxDyn>,
        targets: &Array<F, IxDyn>,
    ) -> Result<F, MetricsError>;
    fn name(&self) -> &str;
}
Expand description

Trait for metrics that can be computed on neural network predictions and targets

Required Methods§

Source

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

Compute the metric value from predictions and targets

Source

fn name(&self) -> &str

Get the name of the metric

Implementors§