Professional Documents
Culture Documents
CST 42315 Dam - L9 1
CST 42315 Dam - L9 1
▪ Evaluation Metrics
Lesson
▪ Model Selection
Topics ▪ Techniques to improve Classification Accuracy
Confusion Matrix:
Predicted C1 ¬ C1
Actual class
class
C1 True Positives False Negatives
(TP) (FN)
¬ C1 False Positives True Negatives
(FP) (TN)
P C ¬C
A
C TP FN P
¬C FP TN N
P’ N’ All
◼ Sensitivity = TP/P
◼ Specificity = TN/N
❑ Precision
exactness – what % of tuples that the classifier
labeled as positive are actually positive
𝑇𝑃
𝑝𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 =
𝑇𝑃 + 𝐹𝑃
❑ Recall
completeness – what % of positive tuples did
the classifier label as positive?
𝑇𝑃
𝑟𝑒𝑐𝑎𝑙𝑙 =
𝑇𝑃 + 𝐹𝑁
❑ Perfect score is 1.0
❑ Inverse relationship between precision & recall
2 × 𝑝𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 × 𝑟𝑒𝑐𝑎𝑙𝑙
𝐹=
𝑝𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 + 𝑟𝑒𝑐𝑎𝑙𝑙
𝑇𝑃 𝑇𝑃
𝑝𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 = 𝑟𝑒𝑐𝑎𝑙𝑙 =
𝑇𝑃 + 𝐹𝑃 𝑇𝑃 + 𝐹𝑁
Holdout Method