• Md. Murad Hossain Modeling and Data science, University of Turin, Via Verdi,8-10124 Turin, Italy
  • Md. Asadullah Department of Statistics, Bangabandhu Sheikh Mujibur Rahman Science and Technology University, Gopalganj 8100, Bangladesh.
  • Mohammad Amzad Hossain Department of Information and Communication Engineering, Noakhali Science and Technology University, Noakhali 3814, Bangladesh.ent of Information and Communication Engineering, Noakhali Science and Technology University, Noakhali 3814, Bangladesh
  • Muhammad Saad Amin Department of Computer Science, University of Turin, Via Verdi,8-10124 Turin, Italy.



Depression, Machine Learning, Classification, Accuracy, oversampling


Depression is a psychiatric condition characterized by a persistent sense of sadness and dullness. It is also known as a severe burdensome problem or clinical sorrow, and it impacts how a person feels, thinks, and behaves and triggers a slew of emotional and physical issues. Various components are liable for this issue, and many related sicknesses are expanding because of this infection. It is not just at risk for well-being perils, yet also produces perilous social offense, like self-destruction and family misuse. In this study, we used machine learning methods such as Random Forest (RF), Logistic Regression (LR), and Naive Bayes (NB). We also used accuracy, precision, recall, and F1-score to survey the exhibition assessment of arrangement results. These machine learning algorithms developed and analyzed Confusion matrices through data augmentation to assess the classification performance. This study used machine learning technologies to predict depression and revealed the significance of the trait. Then we have tried to utilize an oversampling technique that shows the distinction in model execution. Indeed, we wanted to see how well the recommended machine learning algorithms performed before and after rebalancing standardized data. In our suggested framework, the RF classifier performed better with 89% accuracy and 90% precision than other models.



Sau, A., Bhakta, I. (2017)"Predicting anxiety and depression in elderly patients using machine learning technology. "Healthcare Technology Letters 4 (6): 238-43.

J. Choi, J. Choi, and H. T. Jung, “Applying Machine-Learning Techniques to Build Self-reported Depression Prediction Models,” CIN - Comput. Informatics Nurs., vol. 36, no. 7, pp. 317–321, 2018, doi: 10.1097/CIN.0000000000000463.

K. Kipli, A. Z. Kouzani, and I. R. A. Hamid, “Investigating Machine Learning Techniques for Detection of Depression Using Structural MRI Volumetric Features,” Int. J. Biosci. Biochem. Bioinforma., vol. 3, no. 5, pp. 444–448, 2013, doi: 10.7763/ijbbb.2013.v3.252.

[J. F. Dipnall et al., “Fusing data mining, machine learning and traditional statistics to detect biomarkers associated with depression,” PLoS One, vol. 11, no. 2, pp. 1–23, 2016, doi: 10.1371/journal.pone.0148195.

F. Hasanzadeh, M. Mohebbi, and R. Rostami, “Prediction of rTMS treatment response in major depressive disorder using machine learning techniques and nonlinear features of EEG signal,” J. Affect. Disord., vol. 256, no. May, pp. 132–142, 2019, doi: 10.1016/j.jad.2019.05.070.

S. Jiménez-Serrano, S. Tortajada, and J. M. García-Gómez, “A mobile health application to predict postpartum depression based on machine learning,” Telemed. e-Health, vol. 21, no. 7, pp. 567–574, 2015, doi: 10.1089/tmj.2014.0113.

A. Priya, S. Garg, and N. P. Tigga, “Predicting Anxiety, Depression and Stress in Modern Life using Machine Learning Algorithms,” Procedia Comput. Sci., vol. 167, no. 2019, pp. 1258–1267, 2020, doi: 10.1016/j.procs.2020.03.442.

Y. Zhang, S. Wang, A. Hermann, R. Joly, and J. Pathak, “Development and validation of a machine learning algorithm for predicting the risk of postpartum depression among pregnant women,” J. Affect. Disord., vol. 279, no. September 2020, pp. 1–8, 2021, doi: 10.1016/j.jad.2020.09.113.

Z. Xie, O. Nikolayeva, J. Luo, and D. Li, “Building risk prediction models for type 2 diabetes using machine learning techniques,” Prev. Chronic Dis., vol. 16, no. 9, pp. 1–9, 2019, doi: 10.5888/pcd16.190109.

M. Srividya, S. Mohanavalli, and N. Bhalaji, “Behavioral Modeling for Mental Health using Machine Learning Algorithms,” J. Med. Syst., vol. 42, no. 5, 2018, doi: 10.1007/s10916-018-0934-5.

Iliou et al., “ILIOU machine learning preprocessing method for depression type prediction,” Evol. Syst., vol. 10, no. 1, pp. 29–39, 2019, doi: 10.1007/s12530-017-9205-9.

S.Kumar and I. Chong, “Correlation analysis to identify the effective data in machine learning: Prediction of depressive disorder and emotion states,” Int. J. Environ. Res. Public Health, vol. 15, no. 12, 2018, doi: 10.3390/ijerph15122907.

B. Hosseinifard, M. H. Moradi, and R. Rostami, “Classifying depression patients and normal subjects using machine learning techniques and nonlinear features from EEG signal,” Comput. Methods Programs Biomed., vol. 109, no. 3, pp. 339–345, 2013, doi: 10.1016/j.cmpb.2012.10.008.

M. R. Islam, M. A. Kabir, A. Ahmed, A. R. M. Kamal, H. Wang, and A. Ulhaq, “Depression detection from social network data using machine learning techniques,” Heal. Inf. Sci. Syst., vol. 6, no. 1, pp. 1–12, 2018, doi: 10.1007/s13755-018-0046-0.

R. M. Khalil and A. Al-Jumaily, “Machine learning based prediction of depression among type 2 diabetic patients,” Proc. 2017 12th Int. Conf. Intell. Syst. Knowl. Eng. ISKE 2017, vol. 2018-Janua, pp. 1–5, 2017, doi: 10.1109/ISKE.2017.8258766.

Khosrowabadi, Reza, et al. "A Brain-Computer Interface for classifying EEG correlates of chronic mental stress." The 2011 international joint conference on neural networks. IEEE, 2011.

Kleinbaum, D. G., Dietz, K., Gail, M., Klein, M., & Klein, M. (2002). Logistic regression (p. 536). New York: Springer-Verlag.

Davis, Jesse, and Mark Goadrich. "The relationship between Precision-Recall and ROC curves." Proceedings of the 23rd international conference on Machine learning. 2006.

Beauxis-Aussalet, Emma, and Lynda Hardman. "Simplifying the visualization of confusion matrix." 26th Benelux Conference on Artificial Intelligence (BNAIC). 2014.

Chicco, Davide, and Giuseppe Jurman. "The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation." BMC genomics 21.1 (2020): 1-1

Gunn, Steve R. "Support vector machines for classification and regression." ISIS technical report 14.1 (1998): 5-16.




How to Cite

Hossain, M. M., Asadullah, M., Hossain , M. A. ., & Amin , M. S. (2022). PREDICTION OF DEPRESSION USING MACHINE LEARNING TOOLS TAKING CONSIDERATION OF OVERSAMPLING. Malaysian Journal of Public Health Medicine, 22(2), 244–253.