This research investigates the sentiment analysis of public reactions on Twitter to the Constitutional Court’s decision regarding the 2024 Indonesian election. The study focuses on evaluating the effectiveness of Naive Bayes and Gradient Boosted Machines (GBM) in categorizing Twitter sentiments into positive, negative, or neutral. Utilizing TF-IDF vectorization to process the data, our analysis aimed to discern which model more accurately captures the nuances of public sentiment. The results indicate that while Naive Bayes shows high precision and recall in detecting positive sentiments, it performs less effectively for negative and neutral sentiments. In contrast, GBM offers a more uniform performance across all sentiment categories, with particularly strong detection capabilities for neutral sentiments. This comparative analysis underscores the strengths and limitations of each model, providing valuable insights for selecting appropriate sentiment analysis tools depending on the specific nature of the sentiment being analyzed. This study contributes to the strategic application of sentiment analysis models in monitoring and interpreting public opinions in politically significant contexts.