Assignment 13- Comparing Classifiers using Confusion Matrices

docx

School

Arizona State University *

*We aren’t endorsed by this school

Course

511

Subject

Accounting

Date

Apr 3, 2024

Type

docx

Pages

4

Uploaded by AgentQuetzal3025

Report
Assignment 13: Comparing Classifiers using Confusion Matrices Prasad Srinivas IFT 511: Analyzing Big Data Professor: Asmaa Elbadrawy Tuesday and Thursday (12:00 PM – 1:15 PM) November 4, 2023
Confusion Matrix 1. What is the overall accuracy? Overall Accuracy: = (True Positives + True Negatives) / Total Data Points = (650 + 100) / 650+50+200+100 = 750 / 1000 = 0.75 = 75% 2. What is the accuracy over the +ve class? Accuracy over the class: = Tp/ Tp+fn = 650 / 700 = 0.9286 = 92.86% 3. What is the accuracy over the -ve class? Accuracy over the -ve class: = Tn / Tn + fp = 100 / 300 = 0.3333 =33.33% 4. What is the True Positive Rate (TPR)? True Positive Rate (TPR): = Tp / Tp + fn TPR = 650 / 700 TPR = 0.9286 TPR = 92.86% 5. What is the True Negative Rate (TNR)? True Negative Rate (TNR): TNR = Tn/Tn+Fp TNR = 100 / 300 TNR = 0.3333 TNR=33.33%
6. What is the Recall? Recall = True Positives / Total Data Points Recall = 650 / 700 Recall = 0.9286 or 92.86% 7. What is the Precision? Precision = Tp/Tp+Fp Precision = 650 / (650 + 200) Precision = 650 / 850 Precision = 0.7647 Precision = 76.47% 8. What is the F-measure? F-measure = 2 * (Precision * Recall) / (Precision + Recall) F-measure = 2 * (0.7647 * 0.9285) / (0.7647 + 0.9285) F-measure = 0.8386 Expected Value Expected value: P(Tp) *B(Tp)+P(Fp)*B(Fp)+P(Fn)*B(Fn)+P(Tn)*B(Tn) =650/1000*(2) +200/1000* (-1) +50/1000(-3)+100/1000(0) =95/100 =0.95 Expected Value = $950 Comparing Classifiers 1. What is the overall accuracy given by M2? Overall Accuracy is given by M2: = (True Positives + True Negatives) / Total Data Points = (550 + 200) / (550 + 100 + 150 + 200) = 750 / 1000 = 0.75 or 75% 2. What is the accuracy over the +ve class given by M2? Accuracy over the +ve class: =Tp/(Tp+Fn) = 550 / (550 + 150) = 550 / 700 = 0.7857 or 78.57% 3. What is the accuracy over the -ve class given by M2? Accuracy over the -ve class: = Tn / Tn +Fp
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
= 200 / (100 + 200) = 200 / 300 = 0.6667 or 66.67% 4. How does M1 compare to M2 in terms of their accuracy on the +ve & -ve classes? The accuracy of M1 was better than M2 over +ve class The accuracy of M2 was better than M1 over -ve class. 5. If the goal is to build a model that gives the highest possible accuracy over the -ve class, which model do you think works best in that regard? The M2 model works best in the given scenario.