Machine Learning Analysis of Social Media’s Impact on Mental Health in Young Adults
摘要
Social media has significantly transformed how individuals, particularly younger age groups, interact and share experiences. However, its widespread use has raised concerns about its potential impact on mental health. This study aims to analyze and predict the psychological effects of social media usage through machine learning techniques. A dataset was constructed from survey responses collected via Google Forms from individuals aged 15–30 years, assessing key psychological and behavioral indicators such as stress levels, self-esteem, sleep patterns, and time spent on social media. Data preprocessing techniques, including feature scaling and encoding, were applied before implementing various machine learning models, including ensemble methods, tree-based classifiers, and linear algorithms. Model performance was evaluated using accuracy, precision, recall, and F1-score, with XGBoost emerging as the most effective in identifying individuals at risk of adverse mental health outcomes. Furthermore, an interactive web application was developed using Flask to enable real-time predictions and raise awareness of the psychological effects of social media. These findings highlight the potential of machine learning in mental health assessment and provide a foundation for future research on digital well-being.