[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-128082-en":3,"doc-seo-128082-105":31,"detail-sidebar-cat-0-en-105":93},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":28,"seo_description":14,"update_tm":29,"read_time":30},128082,5909887254083,"Miles","https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c",8,"Research & Report","Evaluation of Machine Learning Models for Sentiment Analysis in the South Sumatra Governor Election Using Data Balancing Techniques","Sentiment analysis is crucial for understanding public opinion in political contexts, including the 2024 South Sumatra gubernatorial election. Social media such as Twitter and YouTube provide sentiment signals that can be classified into positive, neutral, and negative categories using machine learning. The study compares SVM, Naïve Bayes, KNN, Decision Tree, and Random Forest, and evaluates the effect of data balancing on accuracy, precision, recall, and F1-score. Results show notable gains after balancing and highlight overfitting tendencies in tree-based models.","Journal of Information Systems and Informatics  \nVol. 7, No. 1, March 2025 e-ISSN: 2656-4882 p-ISSN: 2656-5935  \nDOI: 10.51519/journalisi.v7i1.1019 Published By DRPM-UBD  \nEvaluation of Machine Learning Models for Sentiment Analysis in the South Sumatra Governor Election Using Data Balancing Techniques  \nFebriyanti Panjaitan1, Win Ce2, Hery Oktafiandi3, Ghanim Kanugrahan4, Yudi Ramdhani5, Vito Hafizh Cahaya Putra6  \n1,4,6Informatics Departement, Satu University, Bandung, Indonesia  \n2Information System Departement, Bina Nusantara University, Bandung, Indonesia  \n3,5Information System Departement, Satu University, Bandung, Indonesia  \nEmail:1*[pebrianti.panjaitan@univ.satu.ac.id](pebrianti.panjaitan@univ.satu.ac.id)  \nAbstract  \nSentiment analysis is crucial for understanding public opinion, especially in political contexts like the 2024 South Sumatra gubernatorial election. Social media platforms such as Twitter and YouTube provide key sources of public sentiment, which can be analyzed using machine learning to classify opinions as positive, neutral, or negative. However, challenges such as data imbalance and selecting the right model to improve classification accuracy remain significant. This study compares five machine learning algorithms (SVM, Naïve Bayes, KNN, Decision Tree, and Random Forest) and examines the impact of data balancing on their performance. Data was collected via Twitter crawling (140 entries) and YouTube scraping (384 entries), and text features were extracted using CountVectorizer. The models were then evaluated on imbalanced and balanced datasets using accuracy, precision, recall, and F1-score. The Decision Tree and Random Forest models achieved the highest accuracies of 79.22% and 75.32% on imbalanced data, respectively. However, they also exhibited overfitting, as indicated by their near-perfect training performance. Naïve Bayes, on the other hand, demonstrated the lowest accuracy at 54.55% despite achieving high precision, suggesting frequent misclassification, particularly for the minority class. SVM and KNN also struggled with imbalanced data, recording accuracies of 58.44% and 63.64%, respectively. Significant improvements were observed after applying data balancing techniques. The accuracy of SVM increased to 71.43%, and KNN improved to 66.23%, indicating that these models are more stable and effective when class distributions are even. These findings highlight the substantial impact of data balancing on model performance, particularly for methods sensitive to class distribution. While tree-based models achieved high accuracy on imbalanced data, their tendency to overfit underscores the importance of balancing techniques to enhance model generalization.  \nKeywords: Sentiment Analysis, Machine Learning, Governor Election, Text Analysis, Crawling, Algorithm, Balancing Data.  \n461  \nThis work is licensed under a Creative Commons Attribution 4.0 International License.  \np-ISSN: 2656-5935 [http://journal-isi.org/index.php/isi](http://journal-isi.org/index.php/isi) e-ISSN: 2656-4882  \n1. INTRODUCTION  \nThe 2024 South Sumatra gubernatorial election is a pivotal moment in local democracy, where public opinion significantly influences the direction of regional leadership [1]. With the rapid advancement of digital technology and social media, the public increasingly expresses opinions regarding gubernatorial candidates, work programs, and political issues [2] . Social media platforms like Twitter and YouTube are primary channels for sharing political perspectives, criticisms, and support for competing candidates [3]. The large volume of information generated on these platforms presents an opportunity for sentiment analysis to assess voter preferences and track political trends [4] [5] .  \nOne of the main challenges in sentiment analysis is data imbalance, where the distribution of positive, negative, and neutral sentiments is uneven. This imbalance can reduce the effectiveness of Machine Learning models, le","cbCaivp5b0MEhs0l","https://ap.wps.com/l/cbCaivp5b0MEhs0l","pdf",567386,5,1,18,"English","en",105,"# Introduction\n## Sentiment analysis in political contexts\n## Data imbalance challenges\n## Machine learning approaches for sentiment classification\n# Evaluation results and impact of balancing","[{\"question\":\"Which machine learning algorithms are compared for sentiment analysis?\",\"answer\":\"The study compares five algorithms: SVM, Naïve Bayes, KNN, Decision Tree, and Random Forest.\"},{\"question\":\"How was the dataset collected and text features extracted?\",\"answer\":\"Tweets were collected by crawling (140 entries) and YouTube data by scraping (384 entries). Text features were extracted using CountVectorizer.\"},{\"question\":\"What impact do data balancing techniques have on model performance?\",\"answer\":\"Applying balancing techniques increases classification stability and effectiveness, improving metrics such as accuracy for models like SVM and KNN when class distributions become more even.\"}]","Evaluation of Machine Learning Models for Sentiment Analysis in the South Sumatra Governor Election Using Data Balancing Techniques | PDF",1785944706,45,{"code":4,"msg":32,"data":33},"ok",{"site_id":25,"language":24,"slug":34,"title":13,"keywords":35,"description":14,"schema_data":36,"social_meta":88,"head_meta":90,"extra_data":92,"updated_unix":29},"evaluation-of-machine-learning-models-for-sentiment-analysis-in-the-south-sumatra-governor-election-using-data-balancing-techniques","",{"@graph":37,"@context":87},[38,55,70],{"@type":39,"itemListElement":40},"BreadcrumbList",[41,45,49,52],{"item":42,"name":43,"@type":44,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":46,"name":47,"@type":44,"position":48},"https://docshare.wps.com/document/","Document",2,{"item":50,"name":12,"@type":44,"position":51},"https://docshare.wps.com/document/research-report/",3,{"item":53,"name":13,"@type":44,"position":54},"https://docshare.wps.com/document/evaluation-of-machine-learning-models-for-sentiment-analysis-in-the-south-sumatra-governor-election-using-data-balancing-techniques/128082/",4,{"url":53,"name":13,"@type":56,"author":57,"headline":13,"publisher":59,"fileFormat":62,"inLanguage":24,"description":14,"dateModified":63,"datePublished":64,"encodingFormat":62,"isAccessibleForFree":65,"interactionStatistic":66},"DigitalDocument",{"name":9,"@type":58},"Person",{"url":42,"name":60,"@type":61},"DocShare","Organization","application/pdf","2026-08-27","2026-08-05",true,{"@type":67,"interactionType":68,"userInteractionCount":20},"InteractionCounter",{"@type":69},"ViewAction",{"@type":71,"mainEntity":72},"FAQPage",[73,79,83],{"name":74,"@type":75,"acceptedAnswer":76},"Which machine learning algorithms are compared for sentiment analysis?","Question",{"text":77,"@type":78},"The study compares five algorithms: SVM, Naïve Bayes, KNN, Decision Tree, and Random Forest.","Answer",{"name":80,"@type":75,"acceptedAnswer":81},"How was the dataset collected and text features extracted?",{"text":82,"@type":78},"Tweets were collected by crawling (140 entries) and YouTube data by scraping (384 entries). Text features were extracted using CountVectorizer.",{"name":84,"@type":75,"acceptedAnswer":85},"What impact do data balancing techniques have on model performance?",{"text":86,"@type":78},"Applying balancing techniques increases classification stability and effectiveness, improving metrics such as accuracy for models like SVM and KNN when class distributions become more even.","https://schema.org",{"og:url":53,"og:type":89,"og:title":13,"og:site_name":60,"og:description":14},"article",{"robots":91,"canonical":53},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":94},[95,99,103,107,111,116,121,124,129,132,136],{"id":21,"doc_module":4,"doc_module_name":47,"category_name":96,"show_sort_weight":97,"slug":98},"Story & Novel",90,"story-novel",{"id":48,"doc_module":4,"doc_module_name":47,"category_name":100,"show_sort_weight":101,"slug":102},"Literature",80,"literature",{"id":54,"doc_module":4,"doc_module_name":47,"category_name":104,"show_sort_weight":105,"slug":106},"Exam",70,"exam",{"id":20,"doc_module":4,"doc_module_name":47,"category_name":108,"show_sort_weight":109,"slug":110},"Comic",60,"comic",{"id":112,"doc_module":4,"doc_module_name":47,"category_name":113,"show_sort_weight":114,"slug":115},6,"Technology",50,"technology",{"id":117,"doc_module":4,"doc_module_name":47,"category_name":118,"show_sort_weight":119,"slug":120},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":47,"category_name":12,"show_sort_weight":122,"slug":123},30,"research-report",{"id":125,"doc_module":4,"doc_module_name":47,"category_name":126,"show_sort_weight":127,"slug":128},9,"Religion & Spirituality",20,"religion-spirituality",{"id":127,"doc_module":4,"doc_module_name":47,"category_name":130,"show_sort_weight":127,"slug":131},"World Cup","world-cup",{"id":133,"doc_module":4,"doc_module_name":47,"category_name":134,"show_sort_weight":133,"slug":135},10,"Lifestyle","lifestyle",{"id":137,"doc_module":4,"doc_module_name":47,"category_name":138,"show_sort_weight":20,"slug":139},19,"General","general"]