Preprint
Article

This version is not peer-reviewed.

Mental Health and Technology Usage: A Machine Learning-Based Analysis

Submitted:

10 November 2025

Posted:

11 November 2025

You are already at the latest version

Abstract
This study explores the relationship between students' digital technology usage and its effects on psychological well-being and academic performance in a university setting. By utilizing machine learning algorithms alongside psychometric survey data, the research aims to identify patterns linking screen time, online engagement, and mental health indicators such as anxiety and stress. The findings highlight both positive outcomes for example improved resource access and communication and negative consequences, including increased distraction, dependency, and mental strain. The study offers actionable recommendations for more mindful integration of technology in education, including structured digital environments and improved access to mental health support. These insights can guide institutions in designing policies that balance educational technology use with student well-being.
Keywords: 
;  ;  ;  

1. Introduction

The steady advancement in technology has begun to play a significant role in shaping modern lifestyles, fashion, and most importantly mental health [1]. This paper explores the influence of smartphones, social media platforms, web-based applications, telemedicine, and telehealth, which offer both substantial benefits and notable challenges. These technologies have made mental health assistance and early intervention more accessible, providing support for issues such as anxiety, disrupted sleep patterns, and loneliness [20,21,22].
However, concerns are rising over the potential adverse effects of health applications on psychological well-being [3]. Among the most affected demographics are university students, an age group particularly vulnerable due to their transitional phase into independence. Students often face multiple stressors, including academic pressure, financial concerns, and social isolation [4]. While technology offers channels for communication, support, and information, it simultaneously amplifies risks like isolation, stress, and burnout [5,6,7].
Therefore, structured approaches and programs are required to regulate the positive influence of technology while mitigating its harmful impacts [8,9,10]. This study aims to investigate the relationship between digital technology use and mental health in university students, using machine learning to identify key contributors to deteriorating psychological well-being [17,18,19]. By analyzing digital engagement behaviors such as participation in social networking sites, online gaming, and virtual communities we intend to detect trends, assess risk factors, and propose evidence-based strategies to harness the benefits of technology for improved mental health outcomes [15,16].

2. Literature Review

Evaluating the influence of technological advancement on mental health across diverse population groups remains essential. A study in China found that despite high smartphone ownership, usage of digital mental health tools remains low due to poor digital literacy. The authors emphasized the need for digital literacy workshops to bridge the gap between technological potential and real-world adoption [6].
University campuses are witnessing an alarming rise in mental illness cases, suggesting a need for early interventions. While mobile technologies and social media provide avenues for support, concerns about privacy and low engagement hinder their effectiveness. Integrative therapies combining traditional and modern approaches are increasingly favored [7].
Another study assessed the effectiveness of psychometric testing to quantify how mobile technology use correlates with anxiety and depression, emphasizing improved measurement frameworks [8]. In terms of gender dynamics, research focusing on young males aged 16–24 revealed that masculine norms often act as barriers to help-seeking. Personalized anti-stigma interventions were recommended [9].
Additional studies highlighted the mixed effects of technology on students’ academic and mental health. While digital tools increase engagement, they can also cause distraction. One study found no significant relationship between internet use and academic performance, although a negative trend was observed [10]. Other researchers established clear links between smartphone/social media usage and stress, sleep disorders, and physical health issues, recommending practical strategies like managing notifications and scheduling physical activity [11].
Work examining second-year medical students found that nighttime technology use significantly worsened sleep quality (64.5%) and increased anxiety (61.8%) and depression (25.5%) [12] [13]. Meanwhile, research on Pakistani university students highlighted the impact of academic stress, financial burdens, and technology use on mental health. Social support was shown to reduce anxiety and depression, while low mental health literacy and stigma exacerbated them. Interventions focused on financial aid, awareness, and mental health services were proposed [14].

3. Methodology

Machine learning techniques play an important role in the field of mental health to predict the factors causing mental illnesses. In this paper, we have used classification techniques for the prediction of mental health issues on the basis of provided factors. Simple representation of model framework [23,24]. Figure 1 shows research methodology. Figure 2 shows rapid miner workflow.

3.1. Dataset Description

There are many datasets available on Kaggle for Mental Health prediction based on technology usage. We have taken an updated dataset from Kaggle which is ‘Mental Health and Technology Usage’. The dataset contains 13 features. The number of instances in this dataset is 10000. The target features are ‘Mental Health Status’ and ‘Support System Access’ and the Dataset is balanced. Table 1 shows features from dataset.

3.2. Tool

We have been using the AI Studio(formerly known as RapidMiner) to apply machine learning techniques because it is the most popular tool for applying machine- learning techniques. AI Studio is an Open-source platform. We have used the 2024.1.0 version of AI Studio for Mental Health prediction.
Random Forest is a classification technique that builds an ensemble of decision trees, each generated randomly, to approximate the target label. This method efficiently handles large datasets and automatically addresses class imbalance issues [10]. Figure 3 shows random forest implementation in rapid miner.
Naive Bayes is the kind of the machine learning based on the Bayes theorem that utilizes assumption of independence of feature [25,26,27]. However, it makes the rather innocent assumption and is used extensively with classification tasks, especially for problems of high dimensions [11]. The algorithm determines in which class the point most probably belongs from the totalized conditional probabilities of its constituent attributes assumed to be independent of the class. Figure 4 shows naïve bayes implementation in rapid miner.
The K-Nearest Neighbors (KNN) algorithm is instance-based learning method used for classification [12]. The “K” in KNN represents the number of neighbors considered. KNN works by measuring the distance between the new data point and existing data points, often using Euclidean distance, to find the optimal placement of the new feature within the dataset.
A decision tree is used for classification. It organizes decisions in a tree-like structure [13]. Decision trees are highly regarded for their simplicity and visual clarity, making them effective for interpreting decision-making processes [28,29,30].
The Generalized Linear Model (GLM) is designed to handle both regression and classification tasks. In our study, we utilized various features from the dataset to predict mental health conditions and trained the model based on these features. GLM establishes a linear relationship between the input features and the target variable, making it suitable for mental health predictions [31,32,33]. Its flexibility allows for the incorporation of different link functions, enabling the model to adapt to diverse types of data distributions. Additionally, GLM’s simplicity and interpretability make it an effective tool for analyzing complex datasets.
Gradient boosting is a focusing on the residuals from the previous model’s predictions. Through this iterative process, gradient boosting combines the power of all models to create a robust learner, delivering exceptional predictive performance.

3.3. Framework

A machine learning framework is therefore an environment that makes it easier and quicker to build and apply machine learning models. It offers a structured approach, typically involving several steps: data gathering and preparation, choice of algorithms and, subsequently, models building, and, lastly, model assessment and application. The process starts with compilation of a dataset from the appropriate sources. Subsequently, there is data preprocessing and it includes deleting or managing missing values and tidying the data. Feature selection follows as the next step to identify and analyze the feature parameters that play crucial role in experiment. To deal with data imbalance issue, Synthetic Minority Oversampling Technique (SMOTE) is used to synthesize new samples of the minority class samples. The dataset is then divided into train, validation and test set. The training set is employed to build the models while the validation set comes in handy in the tweaking of hyperparameters to minimize over training. A number of classification models are used to evaluate the performance of the models. There are further things like k- fold cross – validation & Ensemble learning (Stacking & Boosting) through which different models’ prediction can be combined improve performance.
Figure 5. Methodology Framework.
Figure 5. Methodology Framework.
Preprints 184446 g005

3.4. Forward Selection

The forward selection in the case of machine learning is an important tool for the selection of features for a given model. This method commences by identifying a null set concerning features and then adds a feature at every stage of construction. To this end, at each step, the best feature is incorporated which most enhances the predictive capacity of the model adopted. The process goes on until the further additions of the features improve the working of the model. This approach makes modelling easier by eliminating less beneficial factors, thus minimizing complications while, at the same time, offering or enhancing the model’s performance. This is a straightforward approach to creating optimal, efficient machine learning systems.
Splitting data in a 0.7 and 0.3 ratio means dividing the dataset into two parts: known as cross validation 70% of the data was used for training and 30% were used for testing the trained model. The one thing that persists in these training as well as the testing set is that these are employed in cases of assessing the performances of a model. This split is important in a way as it ensures that a model is trained on a sufficient number of data and then tested on new data where the model has not been trained from.

3.5. Apply Model

Once feature selection and data preparation are complete, the trained machine learning model is applied to the dataset. The model’s effectiveness is evaluated using key performance metrics such as accuracy, precision, and recall.
  • Accuracy measures the overall correctness of the model’s predictions.
  • Precision assesses how many of the predicted positive results are actually relevant.
  • Recall evaluates how well the model identifies all relevant instances in the data.
These metrics provide comprehensive insights into the model’s predictive performance, helping to identify areas for potential improvement. Ultimately, this evaluation confirms whether the model effectively meets the intended objectives and supports informed decision-making.

4. Results and Discussion

In this section of the paper, we report and analyze the outcome of the experimental evaluation performed in this study. The process entailed using several techniques on the data gathered on mental health and technology platform. Each of the algorithmic models was executed in turn, and the performance accuracy of each was measured. In the same regard, methods like feature selection were applied to make an optimization and arrive at the maximum attainable accuracy. Table 3 shows results prediction for model.

5. Conclusions and Future Work

This study employed various machine learning models to analyze the relationship between technology use and mental health, with Naïve Bayes achieving the highest prediction accuracy. Despite promising results, challenges remain due to user variability and dataset complexity. Future research should explore deep learning approaches, improved feature engineering, and real-time prediction capabilities. Expanding the dataset and analyzing usage patterns across platforms will further enhance model precision and practical application in mental health prediction.

References

  1. Zhang, X.; Lewis, S.; Chen, X.; Berry, N.; Bucci, S. Technology use and attitudes towards digital mental health in people with severe mental health problems: a survey study in China. Front Psychiatry 2023, 14. [Google Scholar] [CrossRef] [PubMed]
  2. Zhang, X.; Lewis, S.; Chen, X.; Berry, N.; Bucci, S. Technology use and attitudes towards digital mental health in people with severe mental health problems: a survey study in China. Front Psychiatry 2023, 14. [Google Scholar] [CrossRef] [PubMed]
  3. E. G. Lattie, S. K. Lipson, and D. Eisenberg, “Technology and college student mental health: Challenges and opportunities,” 2019, Frontiers Media S.A. [CrossRef]
  4. B. I. Davidson, H. Shaw, and D. A. Ellis, “Fuzzy constructs in technology usage scales,” Mar. 01, 2020. [CrossRef]
  5. Gill, S.H., Razzaq, M.A., Ahmad, M., Almansour, F.M., Haq, I.U., Jhanjhi, N.Z.,... & Masud, M. (2022). Security and privacy aspects of cloud computing: a smart campus case study. Intelligent Automation & Soft Computing, 31(1), 117-128. [CrossRef]
  6. Almulhim, M.; Islam, N.; Zaman, N. A lightweight and secure authentication scheme for IoT based e-health applications. International Journal of Computer Science and Network Security 2019, 19, 107–120. [Google Scholar] [CrossRef]
  7. Zaman, N., Low, T. J., & Alghamdi, T. (2014, February). Energy efficient routing protocol for wireless sensor network. In 16th international conference on advanced communication technology (pp. 808-814). IEEE. [CrossRef]
  8. Tape, N.; Branson, V.; Dry, M.; Turnbull, D. The impact of psychological well-being and ill-being on academic performance: a longitudinal and cross-sectional study. Educational and Developmental Psychologist 2021, 38, 206–214. [Google Scholar] [CrossRef]
  9. S. Biswal Waraich and A. Professor, “INFLUENCE OF TECHNOLOGY ON MENTAL HEALTH AND STUDENT LEARNING 1 Mehak Arora, Bachelors in Arts (Hons), Applied Psychology,” International Journal of Interdisciplinary Approaches in Psychology (IJIAP), vol. 2, p. 5, 2024.
  10. “Management of Inter-relationship between Technology & Mental Health,” Journal of Contemporary Issues in Business and Government, vol. 27, no. 3, Apr. 2021. [CrossRef]
  11. M. P. F. N. da Silva, G. M. da S. Cardoso, S. R. Priolo Filho, S. A. T. Weber, and C. de C. Corrêa, “Technologies and Mental Health in University Students: An Unhealthy Combination,” Int Arch Otorhinolaryngol, vol. 27, no. 02, pp. e324–e328, Apr. 2023. [CrossRef]
  12. C. Gupta, Dr. S. Jogdand, and M. Kumar, “Reviewing the Impact of Social Media on the Mental Health of Adolescents and Young Adults,” Cureus, Oct. 2022. [CrossRef]
  13. Azeem, M.; Ullah, A.; Ashraf, H.; Jhanjhi, N.Z.; Humayun, M.; Aljahdali, S.; Tabbakh, T.A. Fog-oriented secure and lightweight data aggregation in iomt. IEEE Access 2021, 9, 111072–111082. [Google Scholar] [CrossRef]
  14. Ahmed, Q.W.; Garg, S.; Rai, A.; Ramachandran, M.; Jhanjhi, N.Z.; Masud, M.; Baz, M. Ai-based resource allocation techniques in wireless sensor internet of things networks in energy efficiency with data optimization. Electronics 2022, 11, 2071. [Google Scholar] [CrossRef]
  15. Khan, N.A.; Jhanjhi, N.Z.; Brohi, S.N.; Almazroi, A.A.; Almazroi, A.A. A secure communication protocol for unmanned aerial vehicles. CMC-Computers Materials & Continua 2022, 70, 601–618. [Google Scholar] [CrossRef]
  16. Alotaibi, M.S.; Fox, M.; Coman, R.; Ratan, Z.A.; Hosseinzadeh, H. Smartphone addiction prevalence and its association on academic performance, physical health, and mental well-being among university students in Umm Al-Qura University (UQU), Saudi Arabia. International journal of environmental research and public health 2022, 19, 3710. [Google Scholar] [CrossRef] [PubMed]
  17. Kaya, M.; Erdem, C. Students’ well-being and academic achievement: A meta-analysis study. Child Indicators Research 2021, 14, 1743–1767. [Google Scholar] [CrossRef]
  18. Muzafar, S., & Jhanjhi, N. Z. (2020). Success stories of ICT implementation in Saudi Arabia. In Employing Recent Technologies for Improved Digital Governance (pp. 151-163). IGI Global Scientific Publishing. [CrossRef]
  19. Jabeen, T.; Jabeen, I.; Ashraf, H.; Jhanjhi, N.Z.; Yassine, A.; Hossain, M.S. An intelligent healthcare system using IoT in wireless sensor network. Sensors 2023, 23, 5055. [Google Scholar] [CrossRef] [PubMed]
  20. Shengyao, Y.; Xuefen, L.; Jenatabadi, H.S.; Samsudin, N.; Chunchun, K.; Ishak, Z. Emotional intelligence impact on academic achievement and psychological well-being among university students: the mediating role of positive psychological characteristics. BMC psychology 2024, 12, 389. [Google Scholar] [CrossRef] [PubMed]
  21. Lizarte Simón, E.J.; Gijón Puerta, J.; Galván Malagón, M.C.; Khaled Gijón, M. Influence of self-efficacy, anxiety and psychological well-being on academic engagement during university education. Education Sciences 2024, 14, 1367. [Google Scholar] [CrossRef]
  22. Mahato, S.; Das, B. Mental well-being among students with respect to gender, institution and residence: Insight from Purulia district, West Bengal. The Social Science Review A Multidisciplinary Journal 2024, 2, 164–175. [Google Scholar]
  23. Shah, I. A., Jhanjhi, N. Z., & Laraib, A. (2023). Cybersecurity and blockchain usage in contemporary business. In Handbook of Research on Cybersecurity Issues and Challenges for Business and FinTech Applications (pp. 49-64). IGI Global.
  24. Hanif, M.; Ashraf, H.; Jalil, Z.; Jhanjhi, N.Z.; Humayun, M.; Saeed, S.; Almuhaideb, A.M. AI-based wormhole attack detection techniques in wireless sensor networks. Electronics 2022, 11, 2324. [Google Scholar] [CrossRef]
  25. Shah, I. A., Jhanjhi, N. Z., Amsaad, F., & Razaque, A. (2022). The role of cutting-edge technologies in industry 4.0. In Cyber Security Applications for Industry 4.0 (pp. 97-109). Chapman and Hall/CRC.
  26. Humayun, M.; Almufareh, M.F.; Jhanjhi, N.Z. Autonomous traffic system for emergency vehicles. Electronics 2022, 11, 510. [Google Scholar] [CrossRef]
  27. Chaudhry, S.; Tandon, A.; Shinde, S.; Bhattacharya, A. Student psychological well-being in higher education: The role of internal team environment, institutional, friends and family support and academic engagement. Plos one 2024, 19, e0297508. [Google Scholar] [CrossRef] [PubMed]
  28. Nieto Carracedo, A.; Gómez-Iñiguez, C.; Tamayo, L.A.; Igartua Perosanz, J.J. Emotional intelligence and academic achievement relationship: emotional well-being, motivation, and learning strategies as mediating factors. Psicología educativa 2024, 30, 67–74. [Google Scholar] [CrossRef]
  29. Muzammal, S. M., Murugesan, R. K., Jhanjhi, N. Z., & Jung, L. T. (2020, October). SMTrust: Proposing trust-based secure routing protocol for RPL attacks for IoT applications. In 2020 International Conference on Computational Intelligence (ICCI) (pp. 305-310). IEEE. [CrossRef]
  30. Feilong, Q.; Khan, N.A.; Jhanjhi, N.Z.; Ashfaq, F.; Hendrawati, T.D. Improved YOLOv5 Lane Line Real Time Segmentation System Integrating Seg Head Network. Engineering Proceedings 2025, 107, 49. [Google Scholar] [CrossRef]
  31. Bora, P. S., Sharma, S., Batra, I., Malik, A., & Ashfaq, F. (2024, July). Identification and classification of rare medicinal plants. In 2024 International Conference on Emerging Trends in Networks and Computer Communications (ETNCC) (pp. 1-6). IEEE. [CrossRef]
  32. Korda, M.; Shulhai, A.; Shevchuk, O.; Shulhai, O.; Shulhai, A.M. Psychological well-being and academic performance of Ukrainian medical students under the burden of war: a cross-sectional study. Frontiers in Public Health 2025, 12, 1457026. [Google Scholar] [CrossRef] [PubMed]
  33. Griffin, S.M., Lebedová, A., Cruwys, T., McMahon, G., Foran, A.M., Skrodzka, M., ... & Muldoon, O.T. (2025). Identity change and the transition to university: Implications for cortisol awakening response, psychological well-being and academic performance. Applied Psychology: Health and Well-Being, 17(1), e12608. [CrossRef]
Figure 1. Research Paper Overview.
Figure 1. Research Paper Overview.
Preprints 184446 g001
Figure 2. Rapid Miner Implementation Flow. 
Figure 2. Rapid Miner Implementation Flow. 
Preprints 184446 g002
Figure 3. Random Forest Algorithm.
Figure 3. Random Forest Algorithm.
Preprints 184446 g003
Figure 4. Naïve Bayes Algorithm.
Figure 4. Naïve Bayes Algorithm.
Preprints 184446 g004
Table 1. Mental Health Prediction Dataset Features.
Table 1. Mental Health Prediction Dataset Features.
Feature Description
Age Participant’s age (y)
Gender Gender
Technology Use Total hrs
Social Media use hrs
Gaming hours Hrs spent playing
Sleep hours Average daily sleep hours.
Physical activity hours Hours spent on physical activity (e.g., exercise, sports) daily.
Support System Access Access to a personal or professional support system.
Work Environment Impact Perceived impact of the work environment on mental health
Online Support Usage Usage of online support platforms for mental health assistance.
Table 3. Result predictions for models.
Table 3. Result predictions for models.
Model/Algorithm Accuracy
Naïve Bayes 83.04%
Fast Large Margin 82.99%
Random Forest 81.75%
Generalized Linear Model 81.34%
Decision Tree 77.54%
Gradient Boosted Tree 80.32%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2026 MDPI (Basel, Switzerland) unless otherwise stated