Abstract
Twitter can be used to analyze sentiment to get public opinion about public figures to find a trend in positive or negative responses, especially to analyze sentiments related to presidential candidates in the 2019 election in Indonesia. Naïve Bayes (NB) can be used to classify tweet feed into polarity class negative or positive, but it still has low accuracy. Therefore, this study optimizes the Naïve Bayes algorithm with Particle Swarm Optimization (NB-PSO) to classify opinions from twitter feeds to get a good accuracy of public figures sentiment analysis. PSO used to select features to find optimization values to improve the accuracy of Naïve Bayes. There are four steps to optimize NB using PSO, i.e., initializing the population (swarm), calculate the accuracy value that matched with selected features, selected the best accuracy of classification, and updating position and velocity. From this study, the group of tweets was obtained based on the positive and negative sentiments from the community towards two Indonesia presidential candidates in 2019. The NB-PSO test shows the accuracy result of 90.74%. The result of accuracy increases by 4.12% of the NB algorithm. In conclusion, the inclusion of the Particle Swarm Optimization algorithm for Naïve Bayes classification algorithm gives a significant accuracy, especially for sentiment analysis cases.
Published Version
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have