Comparison of SMOTE, Class Weighting, and Classical Machine Learning Models on the ID-SMSA Indonesian Stock Market Dataset
Abstract
Sentiment classification of social-media text related to the Indonesian stock market is a growing research area. The ID-SMSA dataset is the publicly available labelled corpus for this domain, yet class-imbalance handling strategies on this dataset have not been systematically compared across multiple classifiers. This paper evaluates Multinomial Naive Bayes, linear Support Vector Machine (SVM), and Random Forest under three imbalance-handling conditions: no handling, class weighting, and SMOTE. All experiments use the full 3,287-tweet dataset with an 80:20 stratified split and report macro F1 as the primary metric. SMOTE consistently improves macro F1 across all classifiers. The largest gain is on Naive Bayes (+0.137, from 0.589 to 0.726). The best configuration is SVM with SMOTE, achieving macro F1 of 0.752 and accuracy of 0.784. Class weighting benefits Random Forest (+0.011) but slightly reduces SVM, confirming that linear SVM on TF-IDF is robust to moderate imbalance at IR = 2.41. Per-issuer evaluation reveals macro F1 variation from 0.647 on TPIA to 0.881 on BBNI, shaped by vocabulary consistency, class dominance, and domain specificity. These results provide a transparent and reproducible classical baseline that situates transformer-based and deep-learning approaches on ID-SMSA within a well-defined reference frame.
References
Ariyani, P. W., Sunarya, I. M. G., & Gunadi, I. G. A. (2025). ANALISIS SENTIMEN MASYARAKAT TERHADAP VIRUS CORONA BERDASARKAN OPINI DARI TWITTER MENGGUNAKAN METODE NAÏVE BAYES DAN K-NEAREST NEIGHBOR. Jurnal Pendidikan Teknologi Dan Kejuruan, 22(2), 128–138. https://doi.org/10.23887/jptk-undiksha.v22i2.103233
Aziz, F., Jeffry, J., Ayu Asrhi, N., & La Wungo, S. (2025). Classification of Chocolate Consumption Using Support Vector Machine Algorithm. Journal of System and Computer Engineering (JSCE), 6(2), 180–187. https://doi.org/10.61628/jsce.v6i2.1860
Dewi, N. L. P. R., Wijaya, I. N. S. W., Purnamawan, I. K., & Marti, N. W. (2024). Model Classifer Judul Berita Pariwisata Indonesia Berdasarkan Sentimen. Jurnal Teknologi Informasi Dan Ilmu Komputer, 11(1), 117–124. https://doi.org/10.25126/jtiik.20241117617
Gao, X., Xie, D., Zhang, Y., Wang, Z., Chen, C., He, C., Yin, H., & Zhang, W. (2026). A comprehensive survey on imbalanced data learning. Frontiers of Computer Science, 20(11), 2011622. https://doi.org/10.1007/s11704-025-50274-7
Hartanto, J., Liundi, T., Sutoyo, R., & Andangsari, E. W. (2025a). ID-SMSA: Indonesian stock market dataset for sentiment analysis. Data in Brief, 60, 111571. https://doi.org/10.1016/j.dib.2025.111571
Hartanto, J., Liundi, T., Sutoyo, R., & Andangsari, E. W. (2025b). ID-SMSA: Indonesian Stock Market Dataset for Sentiment Analysis (Version 3) [Data set]. Mendeley Data. https://doi.org/10.17632/tn4vzs8tdw.3
Hartanto, J., Sutoyo, R., Liundi, T., & Andangsari, E. W. (2025). A Deep Learning Approach to Sentiment Analysis of Indonesian Stock Market Using IndoBERT. 2025 5th International Conference on Electronic and Electrical Engineering and Intelligent System (ICE3IS), 30–35. https://doi.org/10.1109/ICE3IS66769.2025.11281119
Hidayah, A. K., Sunardi, D., & Sahputra, E. (2025). Analisis Sentimen di Era Digital: Konsep, Algoritma, dan Studi Kasus Media Sosial (I). Litnus.
Hinojosa Lee, M. C., Braet, J., & Springael, J. (2024). Performance Metrics for Multilabel Emotion Classification: Comparing Micro, Macro, and Weighted F1-Scores. Applied Sciences, 14(21), 9863. https://doi.org/10.3390/app14219863
Indrawan, G., Setiawan, H., & Gunadi, A. (2022). Multi-class SVM Classification Comparison for Health Service Satisfaction Survey Data in Bahasa. HighTech and Innovation Journal, 3(4), 425–442. https://doi.org/10.28991/HIJ-2022-03-04-05
Istiqamah, N., & Rijal, M. (2024). Klasifikasi Ulasan Konsumen Menggunakan Random Forest dan SMOTE. Journal of System and Computer Engineering (JSCE), 5(1), 66–77. https://doi.org/10.61628/jsce.v5i1.1061
Maharani, M. D., Indradewi, I. G. A. A. D., & Wijaya, I. N. S. W. (2026). PERBANDINGAN PERFORMA TF-IDF DAN BOW PADA ANALISIS SENTIMEN BPJS KESEHATAN MENGGUNAKAN XGBOOST. Jurnal Pendidikan Teknologi Dan Kejuruan, 23(1), 13–24. https://doi.org/10.23887/jptk-undiksha.v23i1.109604
Munthe, I. R., Sumijan, & Tajuddin, M. (2025). Enhancing Machine Learning Algorithms for Analyzing Financial Condition News of Companies Listed on the Indonesia Stock Exchange. 2025 3rd International Conference on Computer System, Information Technology, and Electrical Engineering (COSITE), 328–333. https://doi.org/10.1109/COSITE68330.2025.11414342
Nassr, Z., Benabbou, F., Sael, N., & Hamim, T. (2025). Improving Sentiment Analysis Performance on Imbalanced Moroccan Dialect Datasets Using Resample and Feature Extraction Techniques. Information, 16(1), 39. https://doi.org/10.3390/info16010039
Raharjo, R. A., Sunarya, I. M. G., & Divayana, D. G. H. (2022). Perbandingan Metode Naïve Bayes Classifier Dan Support Vector Machine Pada Kasus Analisis Sentimen Terhadap Data Vaksin Covid-19 Di Twitter. Elkom : Jurnal Elektronika Dan Komputer, 15(2), 456–464. https://doi.org/10.51903/elkom.v15i2.918
Sanjaya, I. G. A. S., Candiasa, I. M., & Dewi, L. J. E. (2024). Analisis Sentimen Berbasis Aspek Kinerja Polri Menggunakan SVM dengan Pendekatan POS Tagging. SINTECH (Science and Information Technology) Journal, 7(2), 112–124. https://doi.org/10.31598/sintechjournal.v7i2.1568
Saputri, N. K. T. A., Gunadi, I. G. A., & Sunarya, I. M. G. (2024). Analisis Sentimen Pelayanan Daring di Fakultas Teknik dan Kejuruan Universitas Pendidikan Ganesha Menggunakan Algoritma Naïve Bayes dan LSTM. MALCOM: Indonesian Journal of Machine Learning and Computer Science, 4(3), 1120–1129. https://doi.org/10.57152/malcom.v4i3.1336
Sari, A. M., Sunarya, I. M. G., & Maysanjaya, I. M. D. (2026). Perancangan Aplikasi Analisis Sentimen Mengenai Program Petani Milenial Berbasis IndoBERT. Kumpulan Artikel Mahasiswa Pendidikan Teknik Informatika (KARMAPATI), 15(1). https://doi.org/10.23887/karmapati.v15i1.108665
Setiawan, A., & Suryono, R. R. (2024). Analisis Sentimen Ibu Kota Nusantara menggunakan Algoritma Support Vector Machine dan Naïve Bayes. Edumatic: Jurnal Pendidikan Informatika, 8(1), 183–192. https://doi.org/10.29408/edumatic.v8i1.25667
Setiawan, M. H., Gunadi, I. G. A., & Indrawan, G. (2023). Klasifikasi Pelayanan Kesehatan Berdasarkan Data Sentimen Pelayanan Kesehatan menggunakan Multiclass Support Vector Machine. Jurnal Sistem Dan Informatika (JSI), 17(1), 47–54. https://doi.org/10.30864/jsi.v17i1.512
Sidik, P., Sunarya, I. M. G., & Gunadi, I. G. A. (2025). Comparison of Random Forest and Support Vector Machine Methods in Sentiment Analysis of Student Satisfaction Questionnaire Comments at ITB STIKOM Bali. Journal of Applied Informatics and Computing, 9(3), 794–802. https://doi.org/10.30871/jaic.v9i3.9617
Sillviari, N. P. D., Candiasa, I Made, & Indrawan, G. (2025). Classification of Anxiety Levels in Vocational Students Through Life Story Analysis Using Multi-class SVM. Tekno - Pedagogi : Jurnal Teknologi Pendidikan, 15(2), 1–21. https://doi.org/https://doi.org/10.22437/teknopedagogi.v15i2.46957
Simanihuruk, R., Yulianti, E., Azizah, K., & Jatmiko, W. (2025). Sentiment Analysis on Indonesian Stock Market Texts: A Comparative Study of Support Vector Machine (SVM) and IndoBERT. 2025 IEEE International Conference on Data and Software Engineering (ICoDSE), 455–460. https://doi.org/10.1109/ICoDSE68111.2025.11351619
Wijaya, W., Seputra, K. A., & Dewi, N. P. N. P. (2025). FINE TUNNING MODEL INDOBERT UNTUK ANALISIS SENTIMEN BERITA PARIWISATA INDONESIA. Jurnal Pendidikan Teknologi Dan Kejuruan, 22(2), 195–204. https://doi.org/10.23887/jptk-undiksha.v22i2.104056





