Comparative Analysis of Classifiers for Chat Classification: A Study on Random Forest, Support Vector Machine, and Multinomial Naive Bayes with Bag of Words and TF-IDF
摘要
This work focuses on the task of chat classification, aiming to accurately classify chat instances into positive, negative, and neutral classes. The study employs three classifiers: Random Forest, Support Vector Machine (SVM), and Multinomial Naive Bayes (MNB), along with two text representation techniques: Bag of Words (BoW) and TF-IDF (Term Frequency Inverse Document Frequency). The dataset used consists of 584 instances, with 178 positive, 147 negative, and 259 neutral samples. The classifiers are trained and evaluated using metrics such as accuracy, precision, recall, F1-Score, and specificity. The results indicate that SVM with TF-IDF achieved the highest performance across various evaluation metrics, closely followed by Random Forest with TF-IDF. These findings suggest that SVM with TF-IDF is a robust choice for chat classification tasks, while TF-IDF generally outperforms Bag of Words in text representation. The work contributes insights into the effectiveness of different classifiers and text representation techniques for chat classification, providing guidance for future projects in sentiment analysis, customer feedback analysis, and chatbot systems.