## 7 Results and Discussion
### Analysis through Confusion Matrix  
A confusion matrix is a performance evaluation tool for classification models, breaking down predictions into categories of TPs (true positives), TNs (true negatives), FPs (false positives), and FNs (false negatives). In Figure 10(a), the confusion matrix for the NB classifier is illustrated. The matrix includes the values as TP-8349, FP-1165, FN-2960, and TN-10162. Furthermore, the confusion matrix for the DT classifier is highlighted in Figure 10(b), and the values are shown as TP-11218, FP-1123, FN-109, and TN-10186.  
Figure 11: _Cont._Moreover, in Figure 11c, the matrix reveals the values as TP-9791, FP-874, FN-1518, and TN-10453 for the KNN classifier. Additionally, in Figure 11d, the matrix for the LR classifier is presented with specific values as TP-9955, FP-1439, FN-1354, and TN-9838. Finally, in Figure 11e, the emerged RF classifier outlines the values for the confusion matrix as TP-10556, FP-116, FN-753, and TN-11211.  
This indicates that the Random Forest (RF) classifier exhibits a remarkable true positive rate while maintaining an extremely low false positive rate. Above is the illustration of the confusion matrix for the NB, DT, KNN, LR, and RF classifiers.  
The effectiveness and performance of the classifier upgrades as the graph approaches the top-left corner. One popular analytics approach for compressing a classifier's overall performance is the area under the ROC curve (ROC-AUC). Its values vary from 0 to 1, with 1 denoting perfect classification and 0.5 denoting inconsistent grouping. This research shows that out of the five algorithms used, for sentiment analysis on Twitter data, the RF classifier exhibits the optimal convergence. The average precision score it receives is 0.96, meaning that it effectively identifies almost all positive cases, thus producing less false positives.  
The ROC curves for the NB, DT, KNN, LR, and RF classifiers are displayed in Figure 12a. It can be observed that the RF classifier presents a superior AUC value, which is as high as 0.96. This demonstrates that the RF classifier detects positive sentiment from Twitter data with an excellent degree of precision. Furthermore, due to the curve's close placement to the top-left corner, the ROC-AUC shows great performance.  
Figure 11: (**a**). Confusion matrix for NB classifier. (**b**) Confusion matrix for DT classifier. (**c**) Confusion matrix for KNN classifier. (**d**) Confusion matrix for LR classifier. (**e**) Confusion matrix for RF classifier.  
Figure 12b highlights the precision recall curves for NB, DT, KNN, LR, and RF classifiers along with the average precision score. It is noticed that the highest AP score was achieved by the RF classifier with an AP score = 0.96. The ROC curve displays how, as the classification threshold changed, the relationship between the true positive rate (sensitivity) and the false positive rate (specificity-1) adjusted. The different techniques used in sentiment classification and analysis have been summarized and illustrated in Table 2.  
Figure 12: (**a**) ROC curve for NB, DT, KNN, LR, and RF classifiers. (**b**) Precision–recall curve for NB, DT, KNN, LR, and RF classifiers.