# Precision (machine learning) > Precision is the proportion of all the model's positive classifications that are actually positive. It is a metric for classification models that answers the following question:[^1] Precision is the proportion of all the model's positive classifications that are actually positive. It is a metric for [classification models](https://wiki.g15e.com/pages/Classification%20model.txt) that answers the following question:[^1] > When the model predicted the [positive class](https://wiki.g15e.com/pages/Positive%20class%20(machine%20learning.txt)), what percentage of the predictions were correct? Here is the formula: $$ \frac{\text{correctly classified actual positives}}{\text{everything classified as positive}} $$ which means: $$ Precision = \frac{TP}{TP+FP} $$ where: - [True positive](https://wiki.g15e.com/pages/True%20positive.txt) means the model *correctly* predicted the [positive class](https://wiki.g15e.com/pages/Positive%20class%20(machine%20learning.txt)). - [False positive](https://wiki.g15e.com/pages/False%20positive.txt) means the model *mistakenly* predicted the [positive class](https://wiki.g15e.com/pages/Positive%20class%20(machine%20learning.txt)). [Precision](https://wiki.g15e.com/pages/Precision%20(machine%20learning.txt)) improves as [false positives](https://wiki.g15e.com/pages/False%20positive.txt) decrease, while [recall](https://wiki.g15e.com/pages/Recall%20(machine%20learning.txt)) improves when [false negatives](https://wiki.g15e.com/pages/False%20negative.txt) decrease. They often show an inverse relationship, where improving one of them worsens the other. (See also: [F1 score](https://wiki.g15e.com/pages/F1%20score.txt)) ## When (not) to use Use when it's very important for positive predictions to be accurate.[^2] In an [imbalanced dataset](https://wiki.g15e.com/pages/Class-imbalanced%20dataset.txt) where the number of actual positives is very, very low, say 1-2 examples in total, precision is less meaningful and less useful as a metric.[^2] ## See also - [Accuracy](https://wiki.g15e.com/pages/Accuracy%20(machine%20learning.txt)) - [Recall](https://wiki.g15e.com/pages/Recall%20(machine%20learning.txt)) - [False positive rate](https://wiki.g15e.com/pages/False%20positive%20rate.txt) ## Footnotes [^1]: https://developers.google.com/machine-learning/glossary#precision [^2]: [ML crash course - Classification](https://wiki.g15e.com/pages/ML%20crash%20course%20-%20Classification.txt)