Course Wiki

Precision and Recall — Machine Learning Zoomcamp Module 4

Precision tell us the fraction of positive predictions that are correct. It takes into account only the positive class (TP and FP - second column of the confusion matrix), as is stated in the following formula:

Machine Learning Zoomcamp › Module 4: Evaluation Metrics for Classification › Precision and Recall

Notes

Precision tell us the fraction of positive predictions that are correct. It takes into account only the positive class (TP and FP - second column of the confusion matrix), as is stated in the following formula:

\[P = \cfrac{TP}{TP + FP}\]

Recall measures the fraction of correctly identified positive instances. It considers parts of the positive and negative classes (TP and FN - second row of confusion table). The formula of this metric is presented below:

\[R = \cfrac{TP}{TP + FN}\]

In this problem, the precision and recall values were 67% and 54% respectively. So, these measures reflect some errors of our model that accuracy did not notice due to the class imbalance.

!classification_metrics.png

MNEMONICS:

Add notes from the video (PRs are welcome)

⚠️ The notes are written by the community.
If you see an error here, please create a PR with a fix.

Key concepts

Sources


DataTalks.Club. Hosted on GitHub Pages. Built with Rustkyll. We use cookies.