The existence of Twitter, or now replaced with Name X, has been widely used by various levels of society in recent years. And social media X is one of the media that represents public responses to public figures. This study aims to perform sentiment analysis on the opinions of the Indonesian public regarding the public figure Luhut Binsar Pandjaitan on social media X. The data used is 4008 data related to the topic which was obtained through web scraping techniques. This study compares the performance of two popular classification algorithms in sentiment analysis, namely Naïve Bayes and Support Vector Machine (SVM). Before the comparison, SMOTE (Synthetic Minority Over-sampling Technique) optimization was carried out to balance the number of minority and majority data so that both algorithms could learn better from each sentiment class. The results of the comparison show that the Naïve Bayes algorithm produces an accuracy of 95%, while the SVM produces an accuracy of 99%, precision 99%, recall 100%, and F1-Score 99%. Performance evaluation was also carried out by analyzing the confusion matrix of each algorithm. It can be concluded that SVM has the best performance in classifying positive and negative sentiments more accurately than Naïve Bayes for the case of sentiment analysis towards the public figure Luhut Binsar Pandjaitan. Therefore, the SVM algorithm can be a better choice for sentiment analysis towards public figures. This research contributes to the understanding of public opinion about Luhut's performance while serving as the Coordinating Minister for Maritime Affairs and Investment of Indonesia
                        
                        
                        
                        
                            
                                Copyrights © 2024