Sentiment Analysis of Naïve Bayes, Decision Tree, and K-Nearest Neighbor (K-NN) Algorithms for Cyberbullying Comments on Instagram Accounts
Rheza Akbar Perdana, Catur Edi Widodo, Rukun Santoso · 2024
Instagram is the most popular social media platform today, with a diverse user base, from children to adults. Even so, social networks still often exploit other people, especially in the comments column. The data collected shows that 42% of teenagers aged between 12 and 20 years are victims of cyberbullying. Sentiment analysis is a subfield of text mining used to extract, understand, and process text data. Therefore, the author can carry out sentiment analysis in the Instagram comments column to find out the emotions contained in each comment. The Naive Bayes, Decision Tree, and K-Nearest Neighbor (K-NN) classification methods are used to identify each sentiment in comments using K-Fold Cross Validation which uses k=5. Sentiment analysis by mining Instagram data from 800 Indonesian comments obtained using web scrapping. And the classification results produce accuracy values for each method of 91%, 75%, and 85% for comment data as well as evaluating the results of sentiment analysis using a confusion matrix. This accuracy value shows that the Naive Bayes method is the best for classifying Instagram comment data because it produces the highest accuracy value from comment data, namely 91% for comment data on Instagram.