Addressing the complex social debate over pets in public areas, this study assesses public sentiment by analyzing a dataset of YouTube comments. We employed a machine learning pipeline beginning with data collection via the YouTube API, followed by rigorous text preprocessing and SMOTE-based class balancing for the training data. For classification, a Logistic Regression model was trained on contextual features generated by Word Embeddings (Word2Vec) and optimized through hyperparameter tuning. The final model proved highly effective, yielding a test accuracy of 92.74% with F1-scores of 0.84 for the negative class and 0.95 for the positive class. Ultimately, this research establishes an effective approach to measuring public opinion on social issues in Indonesia, providing actionable insights for public space administrators and policymakers.
Copyrights © 2025