ICP 4 - ROHITHKUMARN/CS5542-BigDataAnalytics-RohithKumar GitHub Wiki
Name: Nagulapati Rohith Kumar, Class ID: 16
Name: Nageswara Rao Nandigama, Class ID: 17
ICP ID: 6-2
source code: source code link
Question
1. Accuracy: Overall, how often is the classifier correct?
(TP+TN)/total
2. Misclassification Rate: Overall, how often is it wrong?
(FP+FN)/total equivalent to 1 minus Accuracy also known as "Error Rate"
3. True Positive Rate: When it's actually yes, how often does it predict yes?
TP/actual yes also known as "Sensitivity" or "Recall"
4. False Positive Rate: When it's actually no, how often does it predict yes?
FP/actual no
5. Specificity: When it's actually no, how often does it predict no?
TN/actual no equivalent to 1 minus False Positive Rate
6. Precision: When it predicts yes, how often is it correct?
TP/predicted yes
7. Prevalence: How often does the yes condition actually occur in our sample?
actual yes/total
Source Code snippet for calculating
Output:
confusion Matrix 4.0 1.0 3.0 2.0
Accuracy = 0.6
Error rate=0.4
Weighted True positive rate: 0.6000000000000001
Weighted false positive rate: 0.4
specificity=0.6
Weighted precision: 0.6190476190476191
Weighted recall: 0.6000000000000001
Prevalance=0.5