ANALISIS KOMPARATIF ALGORITMA MACHINE LEARNING UNTUK KLASIFIKASI SENTIMEN MULTI-KELAS BERITA ONLINE MULTI-DOMAIN MENGGUNAKAN TF-IDF

Daniel Christian Gunawan, Albertus Dwiyoga Widiantoro

Abstract


Pesatnya pertumbuhan platform berita online memerlukan analisis sentimen otomatis di berbagai domain. Penelitian ini mengevaluasi dan membandingkan empat algoritma supervised machine learning Logistic Regression, Naïve Bayes, Random Forest, dan Support Vector Machine (SVM) untuk klasifikasi sentimen multi-kelas pada 3.500 artikel berita dalam tujuh kategori. Data teks mentah melalui tahap preprocessing (case folding, pembersihan URL/HTML, penghapusan tanda baca/angka, filtering stopword, dan stemming), dilanjutkan dengan vektorisasi TF-IDF serta seleksi fitur berbasis varians. Dataset dibagi menggunakan stratified split 80:20, dan model dievaluasi menggunakan Akurasi, Presisi, Recall, dan F1-score rata-rata makro untuk menangani ketidakseimbangan kelas. Di antara algoritma yang diuji, Random Forest meraih kinerja klasifikasi tertinggi dengan akurasi keseluruhan sebesar 75,10% dan macro F1-score sebesar 63,39%. Hasil ini memberikan wawasan praktis dalam pemilihan algoritma machine learning yang efektif untuk klasifikasi sentimen berita online multi-domain secara otomatis.

Keywords


Sentiment Analysis; Machine Learning; Text Mining; TF-IDF; Random Forest

Full Text:

PDF

References


Aufar, A. F., Rosid, M. A., Eviyanti, A., & Astutik, I. R. I. (2023). Optimizing Text Preprocessing for Accurate Sentiment Analysis on E-Wallet Reviews: Mengoptimalkan Preprocessing Teks untuk Analisis Sentimen yang Akurat pada Ulasan E-Wallet. JICTE (Journal of Information and Computer Technology Education), 7(2), 42–50.

Bhalerao, K. V. (2021). Customer Reviews Sentiment Analysis: A hybrid technique of Lexicon and Machine Learning based Classification model (SVM, NB, Logistic Regression). Dublin, National College of Ireland.

Das, R. K., Islam, M., Hasan, M. M., Razia, S., Hassan, M., & Khushbu, S. A. (2023). Sentiment analysis in multilingual context: Comparative analysis of machine learning and hybrid deep learning models. Heliyon, 9(9).

Harmandini, K. P. (2024). Analysis of TF-IDF and TF-RF feature extraction on product review sentiment. Sinkron: Jurnal Dan Penelitian Teknik Informatika, 8(2), 929–937.

Israt, J., Islam, M. N., Hasan, M. M., & Siddiky, M. R. (2024). Comparative analysis of machine learning algorithms for sentiment classification in social media text. World Journal of Advanced Research and Reviews, 23(3), 2842–2852.

Jalal, N., Mehmood, A., Choi, G. S., & Ashraf, I. (2022). A novel improved random forest for text classification using feature ranking and optimal number of trees. Journal of King Saud University-Computer and Information Sciences, 34(6), 2733–2742.

Paudel, N., & Yogi, T. N. (2020). Comparative study of machine learning algorithms for rainfall prediction-a case study in Nepal. International Journal of Advanced Research in Engineering and Technology (IJARET), 11(10), 1582–1591.

Prastyo, D., Irawan, D., & Mursyidin, I. H. (2024). Klasifikasi sentimen komentar YouTube dengan NLP pada debat Pilkada Banten 2024. Bit-Tech, 7(2), 413–421.

Safitri, E. D., Ichisasmita, L. H., Agustin, C., Muthoharoh, L., Satria, A., & Manullang, M. C. T. (2026). A Comparative Analysis of Classical Machine Learning and Deep Learning Approaches for Sentiment Classification on IMDb Movie Reviews. ArXiv Preprint ArXiv:2605.07811.

Safitri, E., Syukrilla, W. A., & Fitriana, I. N. L. (2025). Logistic regression for sentiment analysis of insecurity phenomena on platform x. J Statistika: Jurnal Ilmiah Teori Dan Aplikasi Statistika, 18(1), 948–956.

Sitorus, R. A., & Zufria, I. (2024). Application of the naïve Bayes algorithm in sentiment analysis of using the Shopee application on the Play Store. Digital Zone: Jurnal Teknologi Informasi Dan Komunikasi, 15(1), 53–66.

Surya, L. F. Y., Valentina, L., Firmansyah, Z., Fathoni, F., & Ibrahim, A. (2026). Analisis Komparatif Algoritma Process Mining untuk Pemetaan Navigasi dan Deteksi Bottleneck E-Commerce. Jutisi: Jurnal Ilmiah Teknik Informatika Dan Sistem Informasi, 15(3), 861–874.

Widodo, A., Herlambang, B. A., & Renaldy, R. (2025). Optimizing Support Vector Machine (SVM) for Sentiment Analysis of Blu by BCA Reviews with Chi-Square. Journal of Applied Informatics and Computing, 9(5), 2588–2597.

Zhang, L. (2025). Features extraction based on Naive Bayes algorithm and TF-IDF for news classification. PLoS One, 20(7), e0327347.

Zhao, C., Xi, X., Kang, L., & Bai, J. (2026). A weakly supervised SMOTE-XGBoost framework with sliding-window monitoring for temporal sentiment drift detection. Knowledge and Information Systems, 68(1), 186.




DOI: https://doi.org/10.35334/jbit.v6i1.7587

Refbacks

  • There are currently no refbacks.


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

logo jbit

Address:

Gedung Dekanat, Fakultas Teknik, Universitas Borneo Tarakan. Jl. Amal Lama No. 1, Tarakan, Kalimantan Utara, Indonesia. Kodepos: 77123.
Email: jbit@borneo.ac.id

Creative Commons License

All publications

by JBIT (Jurnal Borneo Informatika dan Teknik Komputer)

are licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License

External Link:
Official Web CE UBT