By performing the three algorithm models, the extrovert is encoded as 0 and the introvert is encoded as 1. The confusion matrix provided the values of TP, TN, FP, FN to perform the precision, recall and F1-score.Â
Precision: How trustworthy the positive predictions are.
Recall: How well the model captures all actual members of each class
F1-score: The harmonic mean of precision and recall
Decision Tree Accuracy Result from Python
The Decision Tree model achieved 87% precision, 85% recall, and 0.86 F1-score for the negative class (class 0), and 85% precision, 86% recall, and 0.85 F1-score for the positive class (class 1), with an overall accuracy of 86%. This model handles both classes with almost equally well of the values with overall accuracy of 85.62%.
Precision for Class 0 (Extrovert): Of all predicted extroverts, 87% were correct.
Recall for Class 0 (Extrovert): 85% of actual extroverts were correctly identified.
Naive Bayes Accuracy Result from Python
The Naive Bayes model achieved 95% precision, 90% recall, and 0.92 F1-score for the negative class (class 0), and 90% precision, 94% recall, and 0.92 F1-score for the positive class (class 1), with an overall accuracy of 92.20%.
Precision for Class 1 (Introvert): Of all predicted introverts, 90% were correct.
Recall for Class 1 (Introvert): 94% of actual introverts were correctly identified.
Random Forest Accuracy Result From Python
The Random Forest model achieved 91% precision, 90% recall, and 0.90 F1-score for the negative class (class 0), and 89% precision, 91% recall, and 0.90 F1-score for the positive class (class 1), with an overall accuracy of 90.18%.
Precision for Class 0 (Extrovert): Of all predicted extroverts, 90% were correct.
Recall for Class 0 (Extrovert): 94% of actual extroverts were correctly identified.
Model Accuracy Comparison
The chart visually displays this comparison, with Naive Bayes represented by the highest bar (orange), Random Forest by a medium-height bar (green), and Decision Tree by the shortest bar (blue). The exact accuracy values are also noted above each bar for clarity. Naive Bayes achieved the highest accuracy (92.20%), outperforming Random Forest (90.18%) and Decision Tree (85.62%).