The development of Indonesia's New Capital City (IKN) represents a significant national policy that has triggered diverse public responses, particularly across social media platforms like YouTube. This study aims to analyze public sentiment regarding the IKN project and compare the performance of two text feature extraction methods, FastText and Term Frequency-Inverse Document Frequency (TF-IDF), using the Random Forest algorithm. The primary objective is to identify which method is more effective in capturing the nuances of Indonesian-language public opinion. The dataset for this research includes 4,093 YouTube comments related to IKN, obtained using the YouTube Data API v3 in August 2025. The data were categorized into two classes, positive and negative, while neutral data were removed to minimize model bias. Data labeling was conducted manually and validated by a linguistic expert, followed by pre-processing stages such as data cleaning, case folding, normalization, tokenizing, stopword removal, and stemming. The setting of a 200-vector dimension for FastText and a 5,000-feature limit for TF-IDF was based on findings from previous sentiment analysis research, proving that such configurations provide stable classification performance compared to other parameters, as they are statistically more effective in filtering irrelevant features without losing deep semantic information. Model performance was evaluated using the 10-Fold Cross-Validation method and Confusion Matrix based on accuracy, precision, recall, and F1-score metrics. Results indicate that the FastText method achieved an accuracy of 83.67%, precision of 84.01%, recall of 83.72%, and an F1-score of 80.83%, while TF-IDF yielded an accuracy of 80.53%. These findings conclude that FastText is more effective in representing the context and semantic meaning of Indonesian YouTube comments related to IKN. Furthermore, this method provides a balance in pattern recognition and the precision of sentiment classification results. This research contributes to assisting stakeholders and researchers in more accurately understanding public opinion toward IKN.
Copyrights © 2026