📏  Binary Classification

Binary Classification#

Predicting one of two classes for each instance.

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#

Binary classification predicts one of two classes — positive/negative, 1/0, spam/not-spam. The model doesn’t output a bare label directly; it estimates the probability that an instance belongs to the positive class, then a decision threshold turns that probability into a hard label.

The threshold#

By default the cutoff is 0.5 — probability \(\ge 0.5\) → class 1, else class 0 — but 0.5 is not always right. On imbalanced data (e.g. fraud at 1%), 0.5 may label everything negative; the threshold is tuned against precision / recall or an ROC curve to match the cost of each error.

How it’s judged#

Predictions map to the confusion matrix — true and false positives and negatives — from which precision, recall, F1 and AUROC follow. The threshold choice moves directly along that trade-off.


Theme: Classification & Averaging Metrics  ·  All terminology



See also

Source article Adapted (context, re-expressed) in our own words from: Binary Classification (insightful-data-lab.com).

Tags: purpose: reference topic: terminology level: intermediate