DETECTION OF YOUTUBE COMMENT SPAM USING XGBOOST: OPTIMIZATION AND COMPARISON OF MACHINE LEARNING ALGORITHMS

Syahroni Wahyu Iriananda, Niken Paramita, Rizky Putra Kurniawan · JOURNAL OF SCIENCE AND APPLIED ENGINEERING · 2025

YouTube, as the largest video platform in Indonesia, faces significant challenges due to spam in the comment sections, which can reduce the quality of discussions. This study aims to develop a spam detection model for YouTube comments using the Extreme Gradient Boosting (XGBoost) algorithm, optimized through Randomized Search CV. This model is compared with several other algorithms, such as Random Forest, Naïve Bayes, and Support Vector Machine (SVM). The methodology used in this study involves developing a machine learning-based model with a primary focus on the XGBoost algorithm. The dataset used is the YouTube Spam Collection, which underwent preprocessing using Natural Language Processing (NLP) techniques such as tokenization and lemmatization to extract important features from the comments. The model was tested using various test data ratios (20%, 25%, 30%, and 35%) and optimized using Randomized Search CV to determine the best parameter combinations.The results indicate that Random Forest achieved the highest accuracy of 92.34% at a 30% test data ratio, while XGBoost demonstrated stable accuracy across different test data ratios, reaching 91.70%. Compared to previous studies, the accuracy of 92.34% is still lower than the previous results of 96.94%. Nevertheless, this study provides important insights by demonstrating that hyperparameter optimization can significantly improve the performance of machine learning algorithms. Based on these findings, it can be concluded that Random Forest and XGBoost are effective models for detecting spam in YouTube comments, with Random Forest excelling in accuracy and XGBoost offering consistent performance stability.

Read the paper · More papers on PaperTik