aNet.ai
Machine Learning/Learning path
0day streak0XP · Lv 1
← 7. Classification
Lesson 5 of 6 7 min · 128 words

Binary classification

Two classes, one probability.

Binary classification has two classes, conventionally 1 (positive) and 0 (negative). A single number describes the prediction; .

Which class is 'positive' is a choice — usually the rarer or more interesting one (fraud, disease, spam). This matters because precision, recall and F1 are defined relative to the positive class.

Binary problems are often imbalanced: 1% fraud, 99% normal. Accuracy is then misleading. Handle it with suitable metrics (precision, recall, F1, AUC), class weights in the loss, resampling (oversample the minority, undersample the majority), or threshold tuning.

Formula to remember

Sigmoid

Maps any real number into (0, 1).

Quick check · +5 XP

Softmax of scores (2, 1, 0) gives the largest probability to…

Practice this topic
Saved in this browser as you type.
aNet.ai · Introduction to Machine Learning · NewUU course outlineProgress saved in this browser