Sentiment Analysis of Prabowo Subianto as 2024 Presidential Candidate on Twitter Using K-Nearest Neighbor Algorithm

Aurumnisva Faturrahmi, Zamahsary Martha, Yenni Kurniawati, Fadhilah Fitri
{"title":"Sentiment Analysis of Prabowo Subianto as 2024 Presidential Candidate on Twitter Using K-Nearest Neighbor Algorithm","authors":"Aurumnisva Faturrahmi, Zamahsary Martha, Yenni Kurniawati, Fadhilah Fitri","doi":"10.24036/ujsds/vol1-iss5/101","DOIUrl":null,"url":null,"abstract":"The presidential election is one of the most talked topics at this moment. Based on many surveys, Prabowo Subianto is one of strongest candidates for the upcoming 2024 presidential election. This research aims to see how the public sentiment towards Prabowo Subianto as the presidential candidate tends to be positive or negative. Sentiment classification was conducted using the K-Nearest Neighbor (KNN) algorithm. This algorithm classifies sentiment based on the k value of the nearest neighbor. This analysis was conducted in several stages such as data collection, text preprocessing, data labelling, data classification using the KNN algorithm, and evaluating the accuracy of the model in classifying sentiment. In this research, the results of the sentiment classification were 2731 positive sentiments and 76 negative sentiments. Where the accuracy rate produced by the model using the value of k = 3 on the division of training data and testing data of 80:20 is 97,33%.","PeriodicalId":220933,"journal":{"name":"UNP Journal of Statistics and Data Science","volume":"45 18","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2023-11-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"UNP Journal of Statistics and Data Science","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.24036/ujsds/vol1-iss5/101","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

The presidential election is one of the most talked topics at this moment. Based on many surveys, Prabowo Subianto is one of strongest candidates for the upcoming 2024 presidential election. This research aims to see how the public sentiment towards Prabowo Subianto as the presidential candidate tends to be positive or negative. Sentiment classification was conducted using the K-Nearest Neighbor (KNN) algorithm. This algorithm classifies sentiment based on the k value of the nearest neighbor. This analysis was conducted in several stages such as data collection, text preprocessing, data labelling, data classification using the KNN algorithm, and evaluating the accuracy of the model in classifying sentiment. In this research, the results of the sentiment classification were 2731 positive sentiments and 76 negative sentiments. Where the accuracy rate produced by the model using the value of k = 3 on the division of training data and testing data of 80:20 is 97,33%.
使用 K 近邻算法对推特上普拉博沃-苏比安托作为 2024 年总统候选人的情感分析
总统选举是当前最受关注的话题之一。根据多项调查,普拉博沃-苏比安托是即将到来的 2024 年总统选举中最强有力的候选人之一。本研究旨在了解公众对总统候选人普拉博沃-苏比安托的情感倾向是积极的还是消极的。情感分类使用 K-Nearest Neighbor (KNN) 算法进行。该算法根据最近邻居的 K 值进行情感分类。分析分几个阶段进行,如数据收集、文本预处理、数据标注、使用 KNN 算法进行数据分类,以及评估模型进行情感分类的准确性。在这项研究中,情感分类的结果是 2731 条正面情感和 76 条负面情感。其中,在训练数据和测试数据的比例为 80:20 的情况下,使用 k = 3 值的模型产生的准确率为 97.33%。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信