Precision, Recall, and F1 Score
How do you know if your AI prediction is truly good?
Real data enters, AI predicts, then we measure success in two ways.
In simple words
Imagine you fish and want two things: catching many fish, and making sure they are the right type. Precision and recall both matter.
The real definition
Precision measures how many correct predictions the AI made out of all predictions. Recall measures how many correct answers the AI found out of all real answers.
Like… Medical Test Example
A test finds sick people. Precision asks: of people the test called sick, how many really are? Recall asks: of all sick people, how many did the test find?
But: Real medical tests have costs and risks that precision and recall do not show.
You see it every day
Email spam filter
The AI marks emails as spam. Precision is: how many marked emails are truly spam? Recall is: of all real spam, how many did the AI catch?
Disease detection
A hospital AI checks for illness in patient scans. Precision is accuracy of yes predictions. Recall is finding all real sick cases.
Job applicant screening
A company AI filters resumes. High precision rejects few good people. High recall finds all strong applicants.
Step by step
- 1
Collect real answers
You need true data labeled with correct answers.
- 2
Run AI predictions
The AI predicts yes or no for each input.
- 3
Count correct predictions
See how many times the AI guessed right or wrong.
- 4
Calculate precision
Divide correct predictions by all predictions made.
- 5
Calculate recall
Divide correct predictions by all real yes answers.
Remember
Memory trick
Precision = strict (catch only true fish). Recall = thorough (catch all fish). F1 = balance both.
Words
- Precision pre-SIZH-un
- Correct predictions divided by all predictions made.
- Recall ree-CALL
- Correct predictions divided by all real true answers.
- F1 score eff-one score
- One number that balances precision and recall.
- Prediction pruh-DIK-shun
- The AI's guess about what the answer is.
- Labeled data LAY-beld DAY-ta
- Data that already has correct answers marked.
- Model MOD-ul
- The trained program that makes predictions.
Check yourself
What does precision measure in AI?
Hint
Think: of what the AI said yes to, how many were right?
Precision is the ratio of correct guesses to total guesses.
A doctor AI checks 100 sick patients. It finds 80 truly sick. Real sick patients total 90. What is recall?
Hint
Recall = found sick ÷ all truly sick patients.
Recall divides correct findings by all real yes cases.
When would you want high recall more than high precision?
Show a good answer
When missing something is worse than false alarms. For example, finding all sick people matters more than being certain. A cancer screening should catch all cases, even if some alarms are false.
Tell a friend
“Precision and recall are two ways to check if AI predictions are good.”
People also ask
Why do we need both precision and recall?
Precision alone can miss real cases. Recall alone finds everything but with false alarms. Both together show true AI health.
What is F1 score?
F1 score is one number that balances precision and recall. It helps you compare models quickly.
How do I calculate recall?
Count predictions the AI got right. Divide by the total number of real yes answers in your truth data.