Machine Learning Prediction of Anxiety Levels in the Society of Academicians During the Covid-19 Pandemic

  • Angelina Pramana Thenata Universitas Bunda Mulia, Indonesia
  • Martinus Suryadi Universitas Bunda Mulia, Indonesia
Keywords: Covid-19, Anxiety, SAS, K-Means, Confusion matrix


Various sectors in Indonesia have been impacted by the COVID-19 incident, such as the trade, health, entertainment, and social sectors. Although several steps have been taken to minimize the coronavirus's impact, problems still occur, especially in the education sector, which must carry out one of the challenges faced in the learning process during the pandemic. However, the environment and learning process that turned into distance learning caused the interaction with friends to decrease, and academics could only move in a limited space, making them overwhelmed by feelings of anxiety. Anxiety must be detected early and managed properly not to cause mental deterioration. Therefore, the researcher aims to predict academic anxiety based on the self-rating anxiety scale (SAS), demography, family, lifestyle, and employment using k-means. Furthermore, tested the prediction results obtained with a confusion matrix in accuracy, precision, and recall. The test results found the accuracy rate is 99%, precision is 98% (moderate level), 100% (normal level), and recall is 97% (normal level), 100% (moderate level). These results indicate that the k-means on demographic, family, lifestyle, employment, and SAS aspects provide optimal results for predicting the anxiety level of the BM University academic community.


Banerjee, D. (2020). The covid-19 outbreak: Crucial role the psychiatrists can play. Asian journal of psychiatry, 50:102014.
Brooks, S. K., Webster, R. K., Smith, L. E., Woodland, L., Wessely, S., Greenberg, N., and Rubin, G. J. (2020). The psychological
impact of quarantine and how to reduce it: rapid review of the evidence. The lancet, 395(10227):912–920.
Byeon, H. (2021). Exploring factors for predicting anxiety disorders of the elderly living alone in south korea using interpretable
machine learning: A population-based study. International Journal of Environmental Research and Public Health, 18(14):7625.
Chairani, R. C., Irawan, B., and Setianingsih, C. (2021). Klasifikasi data politik pada media sosial dengan algoritma naa ve bayes. ˜
eProceedings of Engineering, 8(2).
Dinata, R. K., Safwandi, S., Hasdyna, N., and Azizah, N. (2020). Analisis k-means clustering pada data sepeda motor. INFORMAL:
Informatics Journal, 5(1):10–17.
Dunstan, D. A., Scott, N., and Todd, A. K. (2017). Screening for anxiety and depression: reassessing the utility of the zung scales.
BMC psychiatry, 17(1):1–8.
Fitri, V. A., Andreswari, R., and Hasibuan, M. A. (2019). Sentiment analysis of social media twitter with case of anti-lgbt campaign
in indonesia using na¨ıve bayes, decision tree, and random forest algorithm. Procedia Computer Science, 161:765–772.
Gruda, D. and Ojo, A. (2022). All about that trait: Examining extraversion and state anxiety during the sars-cov-2 pandemic using a
machine learning approach. Personality and individual differences, 188:111461.
Hoque, M. N., Hannan, A., Imran, S., Alam, M. A., Matubber, B., and Saha, S. M. (2021). Anxiety and its determinants among
undergraduate students during e-learning in bangladesh amid covid-19. Journal of Affective Disorders Reports, 6:100241.
Marzo, R. R., Vinay, V., Bahari, R., Chauhan, S., Ming, D. A. F., Fernandez, S., Fernandez, P. N., Johnson, C. C. P., Rahman, M. M.,
Goel, S., et al. (2021). Depression and anxiety in malaysian population during third wave of the covid-19 pandemic. Clinical
epidemiology and global health, 12:100868.
Nabila, Z., Isnain, A. R., Permata, P., and Abidin, Z. (2021). Analisis data mining untuk clustering kasus covid-19 di provinsi
lampung dengan algoritma k-means. Jurnal Teknologi Dan Sistem Informasi, 2(2):100–108.
Priya, A., Garg, S., and Tigga, N. P. (2020). Predicting anxiety, depression and stress in modern life using machine learning algorithms. Procedia Computer Science, 167:1258–1267.
Rarasati, D. B. (2020). A grouping of song-lyric themes using k-means clustering. JISA (Jurnal Informatika dan Sains), 3(2):38–41.
Richter, T., Fishbain, B., Fruchter, E., Richter-Levin, G., and Okon-Singer, H. (2021). Machine learning-based diagnosis support
system for differentiating between clinical anxiety and depression disorders. Journal of Psychiatric Research, 141:199–205.
Sagala, R. M. (2021). Prediksi kelulusan mahasiswa menggunakan data mining algoritma k-means. TeIKa, 11(2):131–142.
Sauer, K. S., Schmidt, A., Jungmann, S. M., Bailer, J., and Witthoft, M. (2022). Do patients with pathological health anxiety fear ¨
covid-19? a time-course analysis of 12 single cases during the first wave of the covid-19 pandemic in germany. Journal of
psychosomatic research, 152:110687.
Sitepu, A. C., Wanayumini, W., and Situmorang, Z. (2021). Determining bullying text classification using naive bayes classification
on social media. Jurnal Varian, 4(2):133–140.
van Eeden, W. A., Luo, C., van Hemert, A. M., Carlier, I. V., Penninx, B. W., Wardenaar, K. J., Hoos, H., and Giltay, E. J. (2021).
Predicting the 9-year course of mood and anxiety disorders with automated machine learning: A comparison between auto-sklearn,
na¨ıve bayes classifier, and traditional logistic regression. Psychiatry Research, 299:113823
Vibriyanti, D. (2020). Kesehatan mental masyarakat: mengelola kecemasan di tengah pandemi covid-19. Jurnal Kependudukan
Indonesia, pages 69–74.
Wang, C. and Zhao, H. (2020). The impact of covid-19 on anxiety in chinese university students. Frontiers in psychology, 11:1168.
Wang, X., Li, H., Sun, C., Zhang, X., Wang, T., Dong, C., and Guo, D. (2021). Prediction of mental health in medical workers during
covid-19 based on machine learning. Frontiers in public health, 9:697850.
How to Cite
A. Thenata and M. Suryadi, “Machine Learning Prediction of Anxiety Levels in the Society of Academicians During the Covid-19 Pandemic”, Jurnal Varian, vol. 6, no. 1, pp. 81 - 88, Nov. 2022.