pub fn accuracy(
predictions: &[usize],
targets: &[usize],
) -> Result<f32, EvalError>Expand description
Compute classification accuracy as the fraction of correct predictions.
Returns a value in [0, 1]. Returns an error if the slices have different lengths.