Impact of Cosine Similarity Function on SVM Algorithm for Public Opinion Mining About National Sports Week 2024 on X - Mansyur, Abil; Karo Karo, Ichwanul Muslim; Firdaus, Muliawan; Simamora, Elmanani; Darari, Muhammad Badzlan; Habibi, Rizki; Panggabean, Suvriadi (Jurnal Ilmiah Teknik Elektro Komputer dan Informatika, 2025)
Public opinion on PON 2024 (National Sports Week in Indonesia) became a trending topic on X (formerly Twitter), reflecting both positive and negative sentiments. Understanding these sentiments is important for evaluating the event and preparing for the upcoming. However, baseline SVM algorithms using standard kernel functions are not optimized for text similarity and limit performance in sentiment analysis. This research proposes cosine similarity as a substitution for the kernel function on SVM, enhancing the sentiment analyzer's performance on public opinions about PON 2024. The approach leverages cosine similarity's strength in handling text-based data. The key contribution of this research is the integration of cosine similarity into the SVM algorithm as a replacement for kernel functions, improving performance in sentiment analysis. Additionally, this study offers a comprehensive comparison with baseline SVM and provides actionable insights for upcoming PON. The study collected 1,011 tweets related to PON 2024 using web scraping and the Twitter API, followed by labeling sentiments as positive, neutral, or negative. Several preprocessing techniques also were applied to prepare the data. Two models were developed: baseline SVM and another using SVM integrated with cosine similarity, both evaluated through accuracy, precision, recall, and F1-score. The baseline SVM achieved 85.1% accuracy, 85% precision, 83% recall, and 83.3% F1-score, struggling particularly with negative sentiment. Opposite, by integrating cosine similarity on SVM, the performance improved to 88.73% accuracy, 88.3% precision, 89.3% recall, and 88.3% F1-score—a boost of 3.3-6.3%. Additionally, the public opinion revealed that positive sentiments mostly focused on athlete achievements and medal awards, while negative sentiments highlighted issues like referee performance and specific sports (e.g., football). This approach can serve as a valuable tool for event organizers to identify public concerns and maintain positive aspects for the upcoming PON 2028.