# How is precision measured in ML?

The accuracy is determined by the ratio of Positive samples accurately identified to the total number of Positive samples classified. The precision of the model assesses its accuracy in categorizing data as positive.

## Precision formula:

• Precision = True Positive/True Positive + False Positive

When the model makes many inaccurate or few right Positive classifications, the denominator grows and the accuracy decreases. Precision, on the other hand, is high when:

• The model correctly classifies many positives (maximize True Positive).
• Positive classifications are made less incorrectly by the model (minimize False Positive).

Consider a man who is well-liked by everyone. When he makes a prediction, others believe him. Precision is like this man. When accuracy is good, the model may be trusted when it forecasts data as Positive. Thus, precision is useful in determining how accurate the model is when it states a data is Positive.

The precision shows the model’s accuracy in categorizing samples as Positive. The accuracy aim is to correctly categorize all Positive data as Positive while avoiding incorrectly classifying negative data as Positive.

The only method to achieve 100% precision is by correctly categorizing all Positive samples as Positive while avoiding incorrectly categorizing Negative data as Positive.

## Precision and Recall

The choice between accuracy and recall is determined by the nature of the issue being tackled. Use recall if the aim is to detect all positive samples without regard for whether negative samples are misclassified as positive. If the problem is sensitive to identifying a sample as Positive in general, use precision metric.

Assume you are assigned a picture and asked to find all the automobiles in it. Which measure do you employ? Use recall since the aim is to identify all of the autos. This may misinterpret some things as automobiles at first, but it will ultimately identify all of the target objects.

This is also true in the detection of unwell patients, when an ill patient (Actual Positive) is tested and projected to be well (Predicted Negative). If the illness is communicable, the cost of a False Negative will be exceedingly significant. As a result, precision is the favored measure.

Testing. CI/CD. Monitoring.