Artificial intelligence · University
Logistic scores, thresholds and confusion matrices
A logistic model maps a real score through σ(z)=1/(1+exp(−z)). Interpreting a score as a reliable probability requires calibration assessment.
Prerequisites
Probability, ratios and model evaluation.
Study notes
Score
A logistic model maps a real score through σ(z)=1/(1+exp(−z)). Interpreting a score as a reliable probability requires calibration assessment.
Threshold
A binary decision compares a score with a stated threshold. Changing the threshold can trade false positives against false negatives.
Metrics
Precision is TP/(TP+FP); recall is TP/(TP+FN). A zero denominator requires explicit handling rather than silent division.
F1
F1=2TP/(2TP+FP+FN) where defined. It summarizes a tradeoff but does not incorporate every application-specific cost.
Worked examples
Find σ(0) for the logistic sigmoid.
1/(1+exp(0))=1/2.
0.5
With TP=12 and FP=3, find precision.
12/(12+3)=0.8.
0.8
Check your understanding
With TP=12 and FN=8, find recall.
What is a false positive?
- Predicted negative and actually positive
- Correct negative
- Correct positive
- Predicted positive but actually negative
For TP=6, FP=2, FN=4, find F1.
Why can lowering a threshold increase recall while reducing precision?
Answers and marking guidance
Answers and marking notes
- 0.6
12/(12+8)=0.6.
- Predicted positive but actually negative
The predicted class is positive and the true class is negative.
- 2/3
F1=12/(12+2+4)=12/18.
- More examples are labelled positive, potentially capturing missed positives while also admitting more false positives. The exact change depends on the data.
Credit both effects without claiming strict monotonic precision in every finite set.
Further reading and review references
These are reference links, not copied exercises, institutional endorsement or proof of independent review.
AI-assisted preview; independent educational review required. Level labels describe prerequisites, not accreditation or official curriculum alignment.