Article Details
Vol. 5 No. 1 (2026): November
Comparison of Naïve Bayes and SVM for Geopolitical News Sentiment on IHSG Volatility
Purpose: This study aims to analyze public sentiment toward geopolitical news related to the conflict between Iran and the United States and examine its relationship with the volatility of the Indeks Harga Saham Gabungan (IHSG).
Research Methodology: This study used comment data from YouTube, collected through purposive sampling. The data were processed through preprocessing stages, including case folding, text cleaning, tokenization, normalization, stop-word removal, and stemming. Feature extraction was performed using the TF-IDF method. Classification was conducted using the Naïve Bayes and Support Vector Machine (SVM) algorithms implemented in Python. The dataset consisted of 998 entries, divided into 798 training and 200 testing data.
Results: The results indicate that SVM achieved the best performance, with an accuracy of 82.5%, which is slightly higher than that of Naïve Bayes at 81%. In addition, SVM obtained a higher macro-average F1-score (0.72) than Naïve Bayes (0.61), demonstrating better performance in classifying all classes, particularly minority classes.
Conclusions: SVM was more effective in this study, as it provided a more balanced classification performance, although it showed a higher indication of overfitting compared to Naïve Bayes.
Limitations: This study is limited by a relatively small dataset, imbalanced class distribution, and the use of a single data source (YouTube), which may not fully represent the broader public perception.
Contributions: This study identifies effective text-based sentiment classification methods in geopolitical contexts and provides insights into the relationship between public sentiment and IHSG volatility.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.