Per-class Precision (sometimes called class-wise precision)#
Precision computed separately for each class.
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
What it is#
Per-class precision is precision computed separately for each class, treating that class as the positive one and everything else as negative (one-vs-rest). For class \(c\) it is
answering of everything predicted as class c, how much really was c?
Why report it#
A single averaged number can hide a class the model handles badly; per-class precision exposes exactly
which classes suffer false positives. In scikit-learn, precision_score(average=None) returns the
whole array of per-class values.
Its role#
Per-class precision is the building block that micro, macro and weighted averaging then collapse into one score. Best practice is to report the per-class values alongside any aggregate.
Theme: Classification & Averaging Metrics · All terminology
Hint
Mind map — connected ideas
Multiclass Precision · Multilabel Precision · Precision (a.k.a. Positive Predictive Value, PPV) · One-vs-Rest (OvR) · Macro Averaging · Micro Averaging
Hint
More in Classification & Averaging Metrics
Accuracy · AUC (Area Under the Curve) · Average Precision (AP) · Binary Classification · Classification Probability · Discriminatory Power · F1-score · Gini Coefficient · Harmonic Mean · Log Loss (also called Logarithmic Loss or Cross-Entropy Loss) · Macro AUC · Macro AUROC (Macro-Averaged AUROC) · Macro Averaging · Macro F1
See also
Source article Adapted (context, re-expressed) in our own words from: Per-class Precision (sometimes called class-wise precision) (insightful-data-lab.com).