The policy of relocating the National Capital City to Nusantara (IKN) has become a viral and hotly debated issue in Indonesia, triggering diverse public reactions ranging from support to opposition. To understand the dynamics of this public sentiment, this research analyzed user responses from the social media platform X. A total of 1000 tweet data were collected, equally divided into 500 tweets before and 500 tweets after Indonesia's 2024 Independence Day ceremony. These tweet data were then manually labeled and classified for sentiment analysis using Naive Bayes and Random Forest data mining algorithms, with the SMOTE technique applied to address data class imbalance. The analysis results showed that before the Independence Day ceremony, sentiment towards the National Capital City to Nusantara (IKN) was dominated by 44% negative tweets (219 data points), followed by 30% positive (151 data points), and 26% neutral (130 data points). Post-ceremony, negative sentiment significantly increased to 50% (252 data points), while positive sentiment slightly rose to 33% (165 data points), and neutral sentiment decreased to 17% (83 data points). In model performance evaluation, the Random Forest algorithm demonstrated higher classification accuracy compared to Naive Bayes. Nevertheless, the accuracy difference between the two algorithms was relatively small, indicating that both were quite effective for sentiment analysis on this research dataset. This study successfully presents a comprehensive overview of the dynamics and polarity of public opinion on social media X regarding the ongoing policy of relocating the National Capital City to Nusantara.