Sentiment Analysis of Indonesian National Team in 2024 AFF Using Naive Bayes and KNN - Rahmad Adrian; Reni Aryani; Zainil Abidin (Brilliance: Research of Artificial Intelligence, 2025)
Social media platforms like Twitter (now X) serve as key channels for public opinion on major events, including sports tournaments such as the AFF Cup, where sentiments reflect nationalism, criticism, and support. Prior studies have highlighted varying accuracies in sentiment classification for Indonesian football contexts, prompting comparisons of algorithms like Naive Bayes and K-Nearest Neighbors (KNN). This research aims to analyze public sentiment directions towards the Indonesian National Team during the 2024 AFF Cup and compare the performance of Naive Bayes and KNN algorithms. Data comprised 1,918 tweets collected from December 8, 2024, to January 8, 2025, reduced to 1,598 unique entries after preprocessing (cleaning, case folding, tokenizing, filtering, stemming). Sentiments were labeled as positive, negative, or neutral by linguistic experts. TF-IDF vectorized features, and SMOTE addressed class imbalance. Models were trained on 90:10 data splits and evaluated using accuracy, precision, recall, and F1-score, with visualizations including frequency diagrams and word clouds. Neutral sentiments dominated at 49.6%, followed by negative (27.3%) and positive (23.2%). Naive Bayes with SMOTE achieved 79.38% accuracy, outperforming KNN (50-53%). Word clouds revealed supportive terms in positives ("garuda", "semangat"), critical in negatives ("kalah", "pecat"), and factual in neutrals ("indonesia", "piala"). Naive Bayes proves more effective for this dataset, offering insights for team management. Future work should explore advanced models like SVM or BERT and expand data sources for broader generalization.