Predicting Social Media Addiction Using Machine Learning and Interactive Visualization with Streamlit - Alfiyan Tegar Budi Satria Tegar; Herliyani Hasanah; Intan Oktaviani (Komunitas Dosen Indonesia, 2025)
The increasing use of social media among students has raised concerns regarding its impact on mental health, academic performance, and interpersonal relationships. This study introduces a Streamlit-based web application that predicts social media addiction levels using the Random Forest algorithm. The model incorporates variables such as daily usage hours, mental health scores, and conflicts caused by social media. The innovation of this approach lies in combining machine learning with interactive visualizations for real-time addiction prediction, providing a user-friendly, data-driven tool for early screening. Unlike traditional models that primarily rely on self-reported data or simple metrics, this method integrates multiple behavioral and psychological indicators to improve prediction accuracy. The model outperforms linear regression in all key metrics, achieving an R² value of 0.9903, which explains 99.03% of the variation in addiction scores. It also reports a low Mean Absolute Error (MAE) of 0.0370, Mean Squared Error (MSE) of 0.0244, and Root Mean Squared Error (RMSE) of 0.1561, highlighting its accuracy. Black-box testing showed an average error of just 0.354% in predictions and confirmed that the app’s features function effectively across devices. These findings emphasize the potential of this application as an effective tool for identifying students at risk of social media addiction, enabling timely interventions, and offering a foundation for future improvements through real-time data integration and advanced machine learning models.