Confusion matrix predictions को चार categories में organize करता है: True Positives (सही ढंग से flagged), False Positives (गलत तरीके से flagged — Type I error), True Negatives (सही ढंग से passed), और False Negatives (missed — Type II error)। Precision = TP / (TP + FP)। Recall = TP / (TP + FN)। F1 = 2 · (Precision · Recall) / (Precision + Recall)।
अधिकांश classifiers confidence score output करते हैं, और आप एक threshold चुनते हैं जिसके ऊपर "positive" predict करना है। Low threshold अधिक positives पकड़ता है (high recall) लेकिन अधिक false positives बनाता है (low precision)। High threshold अधिक selective है (high precision) लेकिन अधिक positives miss करता है (low recall)। Optimal threshold costs पर निर्भर करता है: medical screening में, बीमारी miss करना (false negative) false alarm से बदतर है। Spam filtering में, real email को spam mark करना (false positive) spam आने देने से बदतर है।
Multi-class problems के लिए, precision और recall प्रति class compute होते हैं और फिर averaged होते हैं। Macro-averaging सभी classes को समान मानता है। Micro-averaging class frequency से weight करता है। Weighted averaging class support से weight करता है। चुनाव मायने रखता है: यदि आपके data का 90% class A है, तो micro-average class A performance से dominated होगा, संभावित रूप से minority classes पर खराब performance को छिपाता है। AI fairness work में, per-class metrics यह सुनिश्चित करने के लिए आवश्यक हैं कि model सभी groups के लिए अच्छा काम करता है।