Function object_detector_rust::utils::evaluate_accuracy
source · pub fn evaluate_accuracy<X, Y>(
model: &dyn Predictable<X, Y>,
x: &Array2<X>,
y: &Array1<Y>
) -> f32where
X: Float,
Y: Label,Expand description
Computes the accuracy of a model’s predictions
Arguments
model- A reference to the model being evaluated. It must implement thePredictabletrait.x- A 2D array containing the input data used to make the predictionsy- A 1D array containing the true labels for the input data
Returns
A floating-point value representing the accuracy of the model’s predictions.