TikTok has become a relevant social media source for observing public responses to public issues, including the Koperasi Merah Putih program. This study compares Support Vector Machine (SVM) and Artificial Neural Network (ANN) for classifying sentiment in TikTok comments. The dataset was obtained through TikTok comment scraping and consisted of 25,669 raw comments. After removing empty comments and applying preprocessing stages consisting of cleaning, case folding, normalization, tokenization, stopword removal, and stemming, 21,026 comments were used for sentiment analysis. Sentiment labels were generated automatically using a lexicon-based sentiment labeling approach and grouped into three classes: positive, negative, and neutral. TF-IDF was used for feature extraction with a maximum of 5,000 features and unigram-bigram representation. The dataset was split into training and testing sets with an 80:20 ratio, while Stratified K-Fold Cross Validation and SMOTE were applied to strengthen evaluation and address class imbalance. The results show that SVM achieved the best overall performance before SMOTE with an accuracy of 86.66% and an F1-score of 86.76%. ANN achieved an accuracy of 85.31% before SMOTE and improved slightly after SMOTE to 85.47%. These findings indicate that SVM is more stable for TF-IDF-based TikTok comment classification, while SMOTE can improve ANN performance slightly but does not always increase all models equally.
Copyrights © 2026