pub fn evaluate_precision<X, Y>(
    model: &dyn Predictable<X, Y>,
    x: &Array2<X>,
    y: &Array1<Y>
) -> f32where
    X: Float,
    Y: Label,
Expand description

Computes the precision of a model’s predictions

Arguments

  • model - A reference to the model being evaluated. It must implement the Predictable trait.
  • x - A 2D array containing the input data used to make the predictions
  • y - A 1D array containing the true labels for the input data

Returns

A floating-point value representing the precision of the model’s predictions.