Precision: A Key Performance Metric for Machine Learning Models

When to use What?

 

Key Purpose of Obtaining Precision

Objective for getting both Precision and Recall is to obtain the F1 score (as we will see later).

 

What is Precision?

Precision is between 0 to 1

0 = BAD
1 = GOOD

Precision in Python

import numpy as np
from sklearn.metrics import precision_score

y_true = [0, 1, 2, 0, 1, 2]
y_pred = [0, 2, 1, 0, 0, 1]
precision_score(y_true, y_pred, average = None)

#average is a compulsory input
#by default, we use average = None
#the precision is 67%

#ml #machine-learning 

Precision: A Key Performance Metric for Machine Learning Models
1.00 GEEK