pub fn per_class_precision_recall(cm: &[Vec<usize>]) -> Vec<(f32, f32)>Expand description
Compute per-class precision and recall from a confusion matrix.
Returns a Vec of (precision, recall) tuples, one per class.
If a class has no predictions, precision is 0.0; if no ground truth, recall is 0.0.