Generative AI Image Sentiment Analysis on Social Media X using TF-IDF and FastText - Saputra, Rahman; Pristyanto, Yoga; Fajri, Ika Nur (Journal of Applied Informatics and Computing, 2025)
This research investigates public opinion on AI-generated images on Social Media X using machine learning-driven text classification. Three classification models were evaluated: Complement Naïve Bayes (CNB) utilizing TF-IDF features, Support Vector Machine (SVM) merging TF-IDF with FastText embeddings, and IndoBERT as a modern transformer-based baseline. A total of 1,958 Indonesian tweets were collected via web scraping with relevant keywords, followed by a pipeline involving text cleaning, manual labeling into positive, negative, and neutral categories, and data balancing using the Synthetic Minority Over-sampling Technique (SMOTE) for the classical models (with class weighting applied for IndoBERT). Results show that the SVM model outperformed the others, achieving 68.7% accuracy with average precision, recall, and F1-score of 0.69, 0.69, and 0.68, respectively; CNB attained 64.1% accuracy with average metrics of 0.64; while IndoBERT recorded 58.2% accuracy with average precision, recall, and F1-score of 0.58, 0.58, and 0.57. Confusion matrix analysis revealed SVM's superior ability to distinguish positive and neutral sentiments in casual language, though IndoBERT demonstrated potential for capturing deeper semantic nuances despite underperforming due to dataset size and informal text. The findings highlight the efficacy of integrating statistical and semantic representations for improved sentiment analysis on unstructured, noisy social media data related to AI-generated imagery, while suggesting that transformer models like IndoBERT may benefit from larger datasets for optimal performance.