Sentiment analysis plays an important role in understanding public opinion toward technological products, particularly in the context of social media such as YouTube. This study aims to analyze the sentiment of user comments on an iPhone 16 review video published by the GadgetIn YouTube channel, as well as to compare the performance of the Naïve Bayes and K-Nearest Neighbor classification algorithms. The data were collected through a crawling process, resulting in 2,499 comments, which were then split into training data 80% and testing data 20%. The methodology includes text cleaning, tokenization, normalization, and term weighting using the TF-IDF method. The experimental results show that the Naïve Bayes algorithm achieved an accuracy of 73%, with precision, recall, and F1-score each reaching 72%, outperforming KNN, which only achieved 65% accuracy. Most comments were neutral; positive comments generally focused on design and performance, while negative comments mainly highlighted price and comparisons with other products. These findings indicate that the Naïve Bayes algorithm is more suitable for sentiment analysis of unstructured YouTube comment data.
Copyrights © 2026