Analisis Model Klasifikasi Sentimen Publik Terhadap Kebijakan Keberlanjutan IKN Menggunakan BERT Sebagai Feature Extractor dan K-Nearest Neighbor (KNN) - Fiqri, Mohammad Hiqmal; Rudiman, Rudiman; Verdikha, Naufal Azmi (Building of Informatics, Technology and Science (BITS), 2025)
This study aims to evaluate the performance of sentiment classification models for public opinions regarding the relocation of Indonesia’s new capital (IKN) using a combination of IndoBERT as a feature extractor and K-Nearest Neighbor (KNN) as a classifier. The dataset consisted of 1,274 YouTube comments related to IKN, which were annotated by an expert in sociology and text analysis. The preprocessing stage involved cleaning numbers, URLs, emojis, and punctuation, as well as removing stopwords using the Sastrawi library. IndoBERT produced 768-dimensional vector representations, which were then classified using KNN with k=5 and Euclidean distance. Evaluation with 5-fold cross validation achieved an accuracy of 73.31%. However, the recall for the positive class was relatively low (0.49), indicating challenges in detecting positive comments due to class imbalance (831 negative, 294 positive, 149 neutral). These findings suggest that the IndoBERT+KNN model performs well on majority classes but struggles with minority classes. The contribution of this research is to provide a critical analysis of the limitations of IndoBERT-based models in Indonesian sentiment classification and to recommend future directions, including data balancing and fine-tuning approaches.