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
Copyrights © 2025