Lesson 2 · Unit 04
Evaluation
Numbers that tell you whether the model is any good
What you practise
- Accuracy and when it lies, precision and recall, overfitting and the validation curve, regularisation (dropout, weight decay), seeds and reproducibility
Try a question from this lesson
Pick one
A fraud detector is 99% accurate. Only 1 transaction in 100 is fraud. What might it be doing?
Hint
What score would the laziest possible detector get on this data?
Correct answer
Saying "not fraud" every single time
Why
If 99% of transactions are honest, calling everything honest scores 99% and catches nothing. Accuracy counts every correct answer alike, so on lopsided data it mostly measures how common the big class is.
The idea
Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.
Concept
Precision and recall
When one class is rare, ask two sharper questions about it.
Precision: of everything the model flagged, what fraction was right? Recall: of everything it should have flagged, what fraction did it catch?
Flagging more raises recall and usually costs precision. Which matters more depends on which mistake is worse.
precision = TP / (TP + FP)
recall = TP / (TP + FN)
TP flagged, and it was real
FP flagged, a false alarm
FN real, and it was missed11 more exercises in the app
- 3× type the answer
- 5× multiple choice
- 1× fill the blanks
- 1× true or false
- 1× match the pairs
Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.