Sentiment Analysis of Twitter Discussions About Lampung Robusta Coffee: A Comparative Study of Machine Learning Algorithms with SVM as The Optimal Model

Authors

DOI:

https://doi.org/10.15408/jti.v18i2.41316

Keywords:

Lampung Robusta Coffee, Sentiment Analysis, Twitter, Machine Learning

Abstract

Lampung Robusta coffee is an important commodity in Indonesia, particularly in terms of local economic potential and global recognition. However, public perception of this product on social media, particularly Twitter, remains underexplored. This study addresses the need for a deeper understanding of consumer sentiment towards Lampung Robusta coffee, which could inform branding and marketing strategies. To approach this issue, we used five supervised machine learning algorithms-KNN, Naive Bayes, SVM, Decision Tree, and Logistic Regression-to perform sentiment classification on a dataset of tweets containing relevant keywords. The dataset was pre-processed using standard natural language processing techniques, including tokenization, stopword removal, and TF-IDF feature extraction. The SVM achieved the best performance on the unbalanced dataset for all metrics, with high and consistent accuracy and F1 scores. Logistic regression followed closely with similarly strong and stable results. Therefore, SVM is recommended as the final model. These results suggest that machine learning approaches can effectively classify sentiment in social media discussions about regional agricultural products and that random forest may provide the most robust performance in this context

 

Author Biographies

  • Yodhi Yuniarthe, Department of Informatics, Faculty of Computer, Indonesia Mitra University, Indonesia
    Yodhi Yuniarthe is a Lecturer at the Department of Computer , Indonesia Mitra University, Lampung, Indonesia. Now, and his PhD degree at the Department of Computer Science, Lampung University. He earned a Bachelor of Computer Science from Indonesia Islamic University (2002) and a Master in Computer Science from STMIK ERESHA, Jakarta (2012). He focuses his research on various applications of Artificial  Intelligence approaches. He can be contacted at email: yodhi@umitra.ac.id
  • Admi Syarif, Department of Computer Science-Faculty of Mathematics and Natural Sciences, Lampung University, Indonesia
    Admi Syarif is an associate professor at Dept. of Computer Science, Faculty of Mathematics and Sciences, Lampung University, Indonesia. He received the Bachelor of Science in Mathematics from Padjadjaran University, Indonesia, in 1990, and his Ph.D. degree in Industrial and Information System Engineering, Ashikaga Institute of Technology, Japan in 2004. He was a director of the research center of Lampung University from 2010 to 2016; and has been a national research reviewer of the Ministry of Education and Culture, Republic Indonesia, since 2014. He received an award as the best researcher in Information Technology from the Ministry of Research and Technology, Indonesia, in 2009. His research interests include Artificial Intelligence, mathematical programming, combinatorial optimization, Genetic Algorithm, and data science. He has been one of the referees for the European Journal of Operational Research and Central European Journal of Operational Research. He also has been an editor for some journals, including the International Journal of Internet Manufacturing and Services. He published several papers, International Journal of Inverse Problems, International Journal of  Applied Mathematics, Journal for Analysis and its Applications, Journal of Plant Engineer Society of Japan, International Journal of Computer and Industrial Engineering, International Journal of Intelligent Manufacturing, International Journal of Smart Engineering, International Journal of Knowledge Engineering and System Design, International Journal of Intelligent Engineering and System and so on. Some of his papers have been presented in several international conferences in Japan, the USA (Los Angeles, San Francisco, Las Vegas, Florida, Hawaii), Hong Kong, Australia, Singapore, Beijing, Zhiang Jia-Jie, Greece, Canada, South Korea, Taiwan, Ireland and so on. One of his papers appeared in the book Fuzzy Set and System by Springer Verlag. He also wrote several books in Indonesian.  Now, he is a member of the Indonesian Mathematical Society (Indo-MS), Indonesian Operation Research Association (IORA), Association of Computer University (APTIKOM), and Indonesian Lecturer Society (IDS).
  • Imam Marzuki Shofi, Department of Informatics, Faculty of Science and Technology, UIN Syarif Hidayatullah Jakarta, Indonesia

    Dr. Imam Marzuki Shofi. Doctore in Computer Science, Faculty of ComputerScience
    University of Indonesia (UI). Bachelor Degree from Mathematics Diponegoro University and
    Master of Science Informatics was completed at Bandung Institute of Technology (ITB).
    Currently, he is the Faculty Member of Informatics Engineering Department UIN Syarif
    Hidayatullah Jakarta. Publication Topics Object Detection,Research Results,Actual Requirements,Additional Light,Analysis System,Aspirations Of People,Average Precision,Average Recall,Bahasa Indonesia,Bayesian Optimization,Blind Area,Blind Spot,Book Form,Characteristics For Applications,Cloth Masks,Community Leaders and etc, His email is imam@uinjkt.ac.id, imam_shofi@yahoo.com.

References

[1] D. P. Widiyani and J. S. S. Hartono, “Studi Eksplorasi Agroklimat Tanaman Kopi Robusta (Coffea canephora) Kabupaten Tanggamus, Lampung,” J. Agrinika J. Agroteknologi dan Agribisnis, vol. 5, no. 1, p. 20, 2021, doi: 10.30737/agrinika.v5i1.1523.

[2] F. Fitriani, B. Arifin, and H. Ismono, “Indonesian coffee exports and its relation to global market integration,” J. Socioecon. Dev., vol. 4, no. 1, p. 120, 2021, doi: 10.31328/jsed.v4i1.2115.

[3] B. P. Statistik, Statistik Kopi Indonesia 2020. 2020.

[4] B. P. Statistik, Statistik Kopi Indonesia 2021. 2021.

[5] B. P. Statistik, Statistik Kopi Indonesia 2022. 2022.

[6] F. D. la P. Nhan Cach Dang, María N. Moreno-García, “Sentiment Analysis Based on Deep Learning :,” MDPI, vol. 1, no. 1, pp. 1–29, 2020, doi: 10.3390/electronics9030483.

[7] J. Ilmiah and E. Islam, “Pemanfaatan Media Sosial Dalam Pengaruhnya Terhadap Pembentukan Persepsi dan Reputasi Wisata Halal di Indonesia,” vol. 8, no. 03, pp. 3236–3248, 2022.

[8] P. Heydarian, A. Bifet, and S. Corbet, “Understanding market sentiment analysis : A survey,” Wiley, pp. 1–23, 2024, doi: 10.1111/joes.12645.

[9] G. K. Patra, C. Kuraku, S. Konkimalla, V. Nagesh, B. Manikanth, and S. Kumar, “Journal of Artificial Intelligence & Cloud Computing A Sentiment Analysis of Customer Product Review Based on Machine Learning Techniques in E-Commerce,” J. Artif. Intell. Cloud Comput., vol. 2, no. 4, pp. 1–7, 2023, doi: 10.47363/JAICC/2023(2)389.

[10] N. Singh, “Sentiment Analysis Using Machine Learning: A Comparative Study,” Adv. Distrib. Comput. Artif. Intell. J., vol. 12, no. 1, 2023, doi: 10.14201/adcaij.26785.

[11] A. Samoggia, “Social media exploration for understanding food product attributes perception : the case of coffee and health with Twitter data,” vol. 122, no. 12, pp. 3815–3835, 2020, doi: 10.1108/BFJ-03-2019-0172.

[12] K. Sharma, L. Hota, V. A. Tikkiwal, and A. Kumar, “ScienceDirect Exploring Exploring Twitter Twitter Sentiments Sentiments for for Predicting Predicting Match Match Outcomes Outcomes in in The The Game of Cricket Game of Cricket,” Procedia Comput. Sci., vol. 235, pp. 152–162, 2024, doi: 10.1016/j.procs.2024.04.018.

[13] Z. Firmansyah and N. F. Puspitasari, “Analisis Sentimen Masyarakat Terhadap Vaksinasi Covid-19 Berdasarkan Opini Pada Twitter Menggunakan Algoritma Naive Bayes,” J. Tek. Inform., vol. 14, no. 2, pp. 171–178, 2021, [Online]. Available: https://doi.org/10.15408/jti.v14i2.24024

[14] Z. A. Sudianto Sudianto, Juan Arton Masheli, Nursatio Nugroho, Rafi Wika Ananda Rumpoko, “Jurnal teknik informatika,” J. Tek. Inform., vol. 15, no. 2, pp. 110–118, 2022, doi: 10.15408/jti.v15i2.24996.

[15] R. Watrianthos, M. Giatman, W. Simatupang, R. Syafriyeti, and N. K. Daulay, “Analisis Sentimen Pembelajaran Campuran Menggunakan Twitter Data,” J. Media Inform. Budidarma, vol. 6, no. 1, p. 166, 2022, doi: 10.30865/mib.v6i1.3383.

[16] K. L. Tan, C. P. Lee, and K. M. Lim, “A Survey of Sentiment Analysis: Approaches, Datasets, and Future Research,” Applied Sciences (Switzerland), vol. 13, no. 7. mdpi.com, Switzerland, pp. 1–21, 2023. doi: 10.3390/app13074550.

[17] R. Patel and K. Passi, “Sentiment Analysis on Twitter Data of World Cup Soccer Tournament Using Machine Learning,” Internet of Things, vol. 1, no. 2, pp. 1–22, 2020, doi: 10.3390/iot1020014.

[18] M. Lamba and M. Madhusudhan, “Sentiment analysis,” in Text Mining for Information Professionals: An Uncharted Territory, 1st ed., S. N. S. AG, Ed., University of Delhi, India: Springer, 2021, pp. 191–211. doi: 10.1007/978-3-030-85085-2_7.

[19] R. Astri, L. P. Hung, S. B. Sura, A. Kamal, and R. Yuliet, “Sentiment analysis using naive bayes for reviews of visitors to Padang City beach tourism after the COVID-19 pandemic,” E3S Web Conf., vol. 464, 2023,doi:10.1051/e3sconf/202346406002.

[20] E. M. Z. Darmawan and A. Fauzan Dianta, “Implementasi Optimasi Hyperparameter GridSearchCV Pada Sistem Prediksi Serangan Jantung Menggunakan SVM,” Teknol. J. Ilm. Sist. Inf., vol. 13, no. 1, pp. 8–15, 2023.

[21] Y. Mao, Q. Liu, and Y. Zhang, “Journal of King Saud University - Computer and Sentiment analysis methods , applications , and challenges : A systematic literature review,” J. King Saud Univ. - Comput. Inf. Sci., vol. 36, no. 4, pp. 1–16, 2024, doi: 10.1016/j.jksuci.2024.102048.

[22] M. Shaden, A. Fadel, S. Achmad, and R. Sutoyo, “ScienceDirect ScienceDirect Sentiment analysis for customer review : Case study of Traveloka Sentiment analysis for customer review : Case study of Traveloka,” Procedia Comput. Sci., vol. 216, no. 2022, pp. 682–690, 2023, doi: 10.1016/j.procs.2022.12.184.

Downloads

Published

2025-10-30

How to Cite

Sentiment Analysis of Twitter Discussions About Lampung Robusta Coffee: A Comparative Study of Machine Learning Algorithms with SVM as The Optimal Model. (2025). JURNAL TEKNIK INFORMATIKA, 18(2), 339-349. https://doi.org/10.15408/jti.v18i2.41316