Identifying Indication of Depression of Twitter User in Indonesia Using Text Mining



depression, social media, text mining, twitter


In line with technological advances, the increasing number of internet users caused more and more social media users, one of which is Twitter. Twitter as a social media is generally used by its users as a place to express themselves, both positive and negative expressions. One example of such negative expressions is depression. According to WHO research, depression is a common mental disorder that can lead the sufferers to commit suicide. In an effort to suppress this issue, many studies seek to develop machine learning models that can identify depression, especially in social media such as Twitter. This research aimed to identify indication of depression of Twitter user in Indonesia using text mining. Tweets which portraying stress are marked by a psychologist and TF-IDF are used for feature extraction in Traditional Machine Learning (TML) and for Deep Learning (DL), word tokenizer is used.  The classification methods used Multinomial Naive Bayes (MNB) and Support Vector Machine (SVM) for TML and Convolutional Neural Network for DL. Over-sampling and under-sampling methods and combination of both are used to deal with TML. The experimental results confirm that MNB, SVM and CNN can be used to detect tweet that has indication of depression in Indonesia. In addition, the use of Deep Learning (CNN) outperforms Traditional Machine Learning (MNB and SVM) in terms of performance scores with a longer calculation time. The highest accuracy of the model reached 91.23%.


Download data is not yet available.


Asosiasi Penyelenggara Jasa Internet Indonesia (APJII), "Laporan survei internet APJII 2019-2020 (Q2)", 2020.

P. Nambisan, Z. Luo, A. Kapoor, T. B. Patrick and R. A. Cisler, “Social media, big data, and public health informatics: Ruminating behavior of depression revealed through twitter,” In Proceedings of the Annual Hawaii International Conference on System Sciences (Vol. 2015–March, pp. 2906–2913), 2015.

P. Collin, K. Rahilly, I. Richardson and A. Third, “The benefits of social networking services: a literature review,” Melbourne: Cooperative Research Centre for Young People, Technology and Wellbeing, 2011.

Q. Dang, F. Gao and Y. Zhou, “Early detection method for emerging topics based on dynamic bayesian networks in micro-blogging networks,” Expert Systems with Applications, 57, 285–295., 2016.

T. Takahashi, R. Tomioka and K. Yamanishi, “Discovering emerging topics in social streams via link-anomaly detection,” IEEE Transactions on Knowledge and Data Engineering, 26(1), 120–130., 2014.

T. Landsdall-Welfare, V. Lampos and N. Cristianini, “Effects of recession on public mood in the UK,” Lyon: The International World Wide Web Conference Committee (IW3C2). IEEE, 2012.

H. Lin, W. Tov and L. Qiu, “Emotional disclosure on social networking sites: the role of network structure and psychological need,” Elsevier, 2014.

N, Andalibi, P. Ozturk and A. Forte, “Sensitive self-disclosures, responses, and social support on Instagram: the case of #depression,” USA: ACM, 2017.

World Health Organization, Depression, January 30, 2020. Accessed on: Jun. 12, 2021. [Online]. Available:

GBD 2017 Disease and Injury Incidence and Prevalence Collaborators, “Global, regional, and national incidence, prevalence, and years lived with disability for 354 diseases and injuries for 195 countries and territories, 1990–2017: a systematic analysis for the Global Burden of Disease Study 2017,” The Lancet, 2018.

Badan Penelitian dan Pengembangan Kesehatan, Kementerian Kesehatan RI, Laporan Nasional RISKESDAS 2018, 2019. Accessed on: Jun., 12, 2021. [Online]. Available:

C. McClellan, M.M. Ali, Ry. Mutter, L. Kroutil and J. Landwehr, “Using social media to monitor mental health discussions - evidence from Twitter,” Journal of the American Medical Informatics Association, 24(3), 496–502, 2017.

S. Joshi, D. Deshpande, “Twitter sentiment analysis system,” International Journal of Computer Applications (0975 – 8887), Volume 180 – No.47, June, 2018

F. Fanesya, R. C. Wihandika, Indriati, “Deteksi emosi pada Twitter menggunakan metode Naive Bayes dan kombinasi fitur,” Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, Vol. 3, No. 7, Juli, 2019.

M. Z. Nasrudin, R. Maskat, R. Musa, “Detecting candidates of depression, anxiety and stress through malay-written tweets: a preliminary study,” Indonesian Journal of Electrical Engineering and Computer Science, Vol. 16, No. 2, November 2019, pp. 787~793, 2019.

P.V. Rajaraman, A. Nath, P. R. Akshaya, B. G. Chatur, “Depression detection of tweets and a comparative test,” International Journal of Engineering Research & Technology (IJERT), 2020.

M. Ambika, K.V. Devakrishnan, A. Divya, R. G. Raj, K. Kaviyaa, “Detection of depression and mental illness of Twitter users using machine learning,” International Journal of Engineering and Advanced Technology (IJEAT), 2020 R. J. Hijmans and J. van Etten, “Raster: Geographic analysis and modeling with raster data,” R Package Version 2.0-12, Jan. 12, 2012. [Online]. Available:

V. Tyagi, S. Singh, “Sentiment analysis to detect mental depression based on twitter data,” International Journal for Research in Applied Science & Engineering Technology (IJRASET), 2020.

Lumban Gaol, N. T., “Teori stres: stimulus, respons, dan transaksional,” Buletin Psikologi. Vol 24, No.1, 2016.

Feldman, R. and Sanger, J., “The text mining handbook.” New York: Cambridge University Press, 2007.

Miner, G. , Dursun, D. , Elder, J. , Fast, A. , Hill, T. and Nisbet, B. , “Practical text mining and statistical analysis for non-structured text data application,” Elsevier, 2012.

Esra A. Afify, Ahmed Sharaf Eldin and Ayman E. Khedr, “Facebook Profile Credibility Detection using Machine and Deep Learning Techniques based on User’s Sentiment Response on Status Message,” (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 11, No. 12, 2020.

P.O. Abas Sunarya, Rina Refianti, Achmad Benny Mutiara and Wiranti Octaviani, “Comparison of Accuracy between Convolutional Neural Networks and Naïve Bayes Classifiers in Sentiment Analysis on Twitter,” (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 10, No. 5, 2019.

Shiyang Liao, Junbo Wang, Ruiyun Yu, Koichi Sato and Zixue Cheng, “CNN for situations understanding based on sentiment analysis of twitter data,” 8th International Conference on Advances in Information Technology, IAIT2016, 19-22 December 2016.

N. Kawasaki, “Parametric study of thermal and chemical nonequilibrium nozzle flow,” M.S. thesis, Dept. Electron. Eng., Osaka Univ., Osaka, Japan, 1993.

Research Framework




How to Cite

B. . Nurfadhila and A. . Suganda Girsang, “Identifying Indication of Depression of Twitter User in Indonesia Using Text Mining”, Int J Intell Syst Appl Eng, vol. 11, no. 2, pp. 523–530, Feb. 2023.



Research Article

Similar Articles

1 2 > >> 

You may also start an advanced similarity search for this article.