Comparison of random forest and SVM methods in sentiment analysis about electric cars in Indonesia - Pratistha, Indra; Iskandar, Adi Panca Saputra; Lanang, Eugenius Gene Rangga; Dewi, Ni Wayan Jeri Kusuma (Institute of Computer Science (IOCS), 2025)
This study examined public sentiment toward electric vehicles (EVs) in Indonesia, where the adoption of EVs reached 28,188 registered units in 2023. The research analyzed user-generated content from the social media platform X (formerly known as Twitter), collecting 1,507 tweets that underwent preprocessing, including text normalization and sentiment labeling. Two machine learning models, Random Forest and Support Vector Machine (SVM), were implemented to classify the tweets into positive and negative sentiments. Each model was evaluated under three experimental scenarios with varying training dataset sizes. The results indicated that the SVM model achieved the best performance in the third scenario, with an accuracy of 81.3%, precision of 88%, and recall of 91%. In comparison, Random Forest achieved its highest results in the same scenario, with an accuracy of 77%, precision of 91%, and recall of 81%. These findings demonstrated that SVM outperformed Random Forest in terms of overall balance between accuracy and recall, making it the more effective model for sentiment classification in this context.