Comparative Analysis of Machine Learning Algorithms for Sentiment Classification on Restaurant Reviews Using TF-IDF Feature Extraction

Ronald Manela Putra Jaya

Abstract


Pertumbuhan pesat platform ulasan restoran daring telah menghasilkan volume umpan balik tekstual yang besar dari pengguna, yang merangkum beragam opini pelanggan mengenai kualitas makanan, pelayanan, dan pengalaman bersantap secara keseluruhan. Penelitian ini melakukan analisis komparatif terhadap empat algoritme klasifikasi machine learning terawasi Logistic Regression, Naïve Bayes, Random Forest, dan Support Vector Machine (SVM) untuk klasifikasi sentimen multikelas pada ulasan restoran. Dataset yang terdiri dari 10.000 ulasan pelanggan dikumpulkan, dan setelah pembersihan data, 9.948 ulasan dipertahankan serta dikategorikan ke dalam tiga kelas sentimen negatif, netral, dan positif berdasarkan rating numeriknya. Data tekstual melalui pipeline praproses sistematis yang terdiri dari case folding, penghapusan tanda baca dan angka, penghapusan stopword, dan stemming, dilanjutkan dengan pembobotan Term Frequency Inverse Document Frequency (TF-IDF) dan seleksi fitur berbasis varians. Dataset dibagi dengan rasio 80:20, dan kinerja model dievaluasi menggunakan Accuracy, Precision, Recall, dan F1-score rata-rata makro. Hasil penelitian menunjukkan bahwa Random Forest memperoleh akurasi keseluruhan tertinggi, sedangkan SVM memperoleh F1-score makro tertinggi, yang menunjukkan bahwa akurasi saja dapat menyesatkan pada dataset yang tidak seimbang. Temuan ini menegaskan pentingnya pemilihan metrik evaluasi dan algoritma yang tepat dalam menangani tugas klasifikasi sentimen yang tidak seimbang pada domain ulasan restoran.

Keywords


Sentiment Analysis; TF-IDF; Machine Learning; Class Imbalance; Restaurant Reviews

Full Text:

PDF

References


Al-Qudah, D. A., Ala’M, A.-Z., Cristea, A. I., Merelo-Guervós, J. J., Castillo, P. A., & Faris, H. (2025). Prediction of sentiment polarity in restaurant reviews using an ordinal regression approach based on evolutionary XGBoost. PeerJ Computer Science, 11, e2370.

Barron, R. C. (2025). Trustworthy Domain-Specific AI for Structured Knowledge Retrieval and Reasoning. University of Maryland, Baltimore County.

Farhadpour, S., Warner, T. A., & Maxwell, A. E. (2024). Selecting and interpreting multiclass loss and accuracy assessment metrics for classifications with class imbalance: Guidance and best practices. Remote Sensing, 16(3), 533.

Gillioz, A., Casas, J., Mugellini, E., & Abou Khaled, O. (2020). Overview of the Transformer-based Models for NLP Tasks. 2020 15th Conference on Computer Science and Information Systems (FedCSIS), 179–183.

Haiman, J. (1998). Talk is cheap: Sarcasm, alienation, and the evolution of language. Oxford University Press.

Kamath, B. P., Geetha, M., Acharya, U. D., Singh, D., Rao, A., Rai, S., & Shetty, R. (2025). Comprehensive analysis of word embedding models and design of effective feature vector for classification of Amazon product reviews. IEEE Access, 13, 25239–25255.

Kohli, K. (2025). Sentiment Analysis of Restaurant Reviews Using Machine Learning Algorithms.

Mao, Y., Liu, Q., & Zhang, Y. (2024). Sentiment analysis methods, applications, and challenges: A systematic literature review. Journal of King Saud University Computer and Information Sciences, 36(4), 102048.

Mehedi, M. H. K., Farid, F. Al, Rhythm, E. R., Rahman, F., Hasib, K. M., Uddin, J., & Mansor, S. (2025). Deep hierarchical networks for sentiment analysis of restaurant reviews from food apps. Scientific Reports, 15(1), 40148.

Pajila, P. J. B., Sheena, B. G., Gayathri, A., Aswini, J., & Nalini, M. (2023). A comprehensive survey on naive bayes algorithm: Advantages, limitations and applications. 2023 4th International Conference on Smart Electronics and Communication (ICOSEC), 1228–1234.

Pradana, A., Fadllullah, A., Prasetya, A., & Fadliansyah, F. (2025). The Application Of The Multi-Objective Optimization On The Basis Of Simple Ratio Analysis Method In A Decision Support System For Prospective Ubt Student Association Chair Candidates. JIPI (Jurnal Ilmiah Penelitian Dan Pembelajaran Informatika), 10(2), 1804–1812.

Rahman, A., Khan, M. A., Bishnu, K. K., Rozario, U., Ishraq, A., Mridha, M. F., & Aung, Z. (2025). Multilingual sentiment analysis in restaurant reviews using aspect focused learning. Scientific Reports, 15(1), 28371.

Rokhva, S., Teimourpour, B., & Babaei, R. (2025). Enhanced sentiment analysis of Iranian restaurant reviews utilizing sentiment intensity analyzer & fuzzy logic. Food and Humanity, 5, 100658.

Wankhade, M., Rao, A. C. S., & Kulkarni, C. (2022). A survey on sentiment analysis methods, applications, and challenges. Artificial Intelligence Review, 55(7), 5731–5780.

Yarsasi, S., & Iskoko, A. (2025). A Text Classification Approach for Detecting Cyberbullying Risk on Twitter Using Support Vector Machine with Naive Bayes and Random Forest Comparison. International Journal of Informatics and Information Systems, 8(4), 175–187.

Zahra, N. Z., Farhanatussaidah, S., Afifah, N. N., Muthoharoh, L., Satria, A., & Manullang, M. C. T. (2026). Benchmarking Logistic Regression, SVM, Naive Bayes, and IndoBERT fine-tuning for sentiment analysis on Indonesian product reviews. ArXiv Preprint ArXiv:2605.03439.




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

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