Detection of Suicidal Ideation on Twitter using Machine Learning & Ensemble Approaches

Main Article Content

Syed Tanzeel Rabani
Qamar Rayees Khan
Akib Mohi UD Din Khanday


Suicidal ideation is one of the most severe mental health issues faced by people all over the world. There are various risk factors involved that can lead to suicide. The most common & critical risk factors among them are depression, anxiety, social isolation and hopelessness. Early detection of these risk factors can help in preventing or reducing the number of suicides. Online social networking platforms like Twitter, Redditt and Facebook are becoming a new way for the people to express themselves freely without worrying about social stigma. This paper presents a methodology and experimentation using social media as a tool to analyse the suicidal ideation in a better way, thus helping in preventing the chances of being the victim of this unfortunate mental disorder. The data is collected from Twitter, one of the popular Social Networking Sites (SNS). The Tweets are then pre-processed and annotated manually. Finally, various machine learning and ensemble methods are used to automatically distinguish Suicidal and Non-Suicidal tweets. This experimental study will help the researchers to know and understand how SNS are used by the people to express their distress related feelings and emotions. The study further confirmed that it is possible to analyse and differentiate these tweets using human coding and then replicate the accuracy by machine classification. However, the power of prediction for detecting genuine suicidality is not confirmed yet, and this study does not directly communicate and intervene the people having suicidal behaviour.


Download data is not yet available.

Article Details

How to Cite
Rabani ST, Khan QR, Khanday AMUD. Detection of Suicidal Ideation on Twitter using Machine Learning & Ensemble Approaches. Baghdad Sci.J [Internet]. 2020Dec.1 [cited 2021Jan.18];17(4):1328. Available from:


Desmet B, Hoste V. Online suicide prevention through optimised text classification. Inf Sci (Ny). 2018;439–440:61–78.

Patel V, Ramasundarahettige C, Vijayakumar L, Thakur JS, Gajalakshmi V, Gururaj G, et al. Suicide mortality in India: A nationally representative survey. Vol. 379, The Lancet. Lancet Publishing Group; 2012. p. 2343–51.

Fu K, Cheng Q, Wong PWC, Yip PSF. Responses to a Self-Presented Suicide Attempt in Social Media. Crisis. 2013 Nov;34(6):406–12.

Gunn JF, Lester D. Twitter postings and suicide: An analysis of the postings of a fatal suicide in the 24 hours prior to death. Suicidologi. 2015 Jun 1;17(3).

Kailasam VK, Samuels E. Can social media help mental health practitioners prevent suicides? Curr Psychiatr. 2015;14(2):37–39, 51.

Huang X, Xing L, Brubaker JR, Paul MJ. Exploring Timelines of Confirmed Suicide Incidents Through Social Media. Proc - 2017 IEEE Int Conf Healthc Informatics, ICHI 2017. 2017;470–7.

Vioules MJ, Moulahi B, Aze J, Bringay S. Detection of suicide-related posts in Twitter data streams. IBM J Res Dev. 2018;62(1):7:1-7:12.

Choudhury M De, Gamon M, Counts S, Horvitz E. Predicting depression through social media. Proceedings of ICWSM. 2013.

Kiciman E, Kumar M, De Choudhury M, Coppersmith G, Dredze M. Discovering Shifts to Suicidal Ideation from Mental Health Content in Social Media. In 2016.

How Twitter Users Compare to the General Public | Pew Research Center [Internet]. [cited 2020 Jan 1]. Available from:

Wolk‐Wasserman D. Suicidal communication of persons attempting suicide and responses of significant others. Acta Psychiatr Scand. 1986;73(5):481–99.

Jashinsky J, Burton SH, Hanson CL, West J, Giraud-Carrier C, Barnes MD, et al. Tracking suicide risk factors through Twitter in the US. Crisis. 2014;35(1):51–9.

Catal C, Nangir M. A sentiment classification model based on multiple classifiers. Appl Soft Comput J. 2017 Jan 1;50(50):135–41.

Kiritchenko S, Zhu X, Mohammad SM. Sentiment analysis of short informal texts. J Artif Intell Res. 2014 Aug 20;50:723–62.

Shiori T, NISHIMURA A, AKAZAWA K, ABE R, NUSHIDA H, UENO Y, et al. Incidence of note-leaving remains constant despite increasing suicide rates. Psychiatry Clin Neurosci. 2005 Apr;59(2):226–8.

Sikander D, Arvaneh M, Amico F, Healy G, Ward T, Kearney D, et al. Predicting risk of suicide using resting state heart rate. In: 2016 Asia-Pacific Signal and Information Processing Association Annual Summit and Conference, APSIPA 2016. Institute of Electrical and Electronics Engineers Inc.; 2017.

Huang Y-P, Goh T, Liew CL. Hunting Suicide Notes in Web 2.0 - Preliminary Findings. In Institute of Electrical and Electronics Engineers (IEEE); 2008. p. 517–21.

Varathan KD, Talib N. Suicide detection system based on Twitter. Proc 2014 Sci Inf Conf SAI 2014. 2014;785–8.

Desmet B. Automatic text classi cation for suicide prevention. 2014;1–205.

O’Dea B, Wan S, Batterham PJ, Calear AL, Paris C, Christensen H. Detecting suicidality on twitter. Internet Interv. 2015;2(2):183–8.

De Choudhury M, Kıcıman E. The Language of Social Support in Social Media and its Effect on Suicidal Ideation Risk. Proc . Int AAAI Conf Weblogs Soc Media Int AAAI Conf Weblogs Soc Media. 2017;2017.

Coppersmith G, Ngo K, Leary R, Wood A. Exploratory Analysis of Social Media Prior to a Suicide Attempt. Proc Third Work Comput Lingusitics Clin Psychol. 2016;106–17.

Joseph A, Ramamurthy B. Suicidal behavior prediction using data mining techniques. Int J Mech Eng Technol. 2018;9(4):293–301.

American Association of Suicidology – Suicide Prevention is Everyone’s Business [Internet]. [cited 2020 Apr 8]. Available from:

AL-Jumaili AS. A Hybrid Method of Linguistic and Statistical Features for Arabic Sentiment Analysis. Baghdad Sci J. 2020;17(1(Suppl.)):0385.

Bao Y, Quan C, Wang L, Ren F. The role of pre-processing in twitter sentiment analysis. In: Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics). Springer Verlag; 2014. p. 615–24.

Anand N, Goyal D, Kumar T. Analyzing and Preprocessing the Twitter Data for Opinion Mining. In: Lecture Notes in Networks and Systems. Springer; 2018. p. 213–21.

Dar AR, Ravindran D. Fog computing resource optimization: A review on current scenarios and resource management. Baghdad Sci J. 2019;16(2):419–27.

Cash SJ, Thelwall M, Peck SN, Ferrell JZ, Bridge JA. Adolescent Suicide Statements on MySpace. Cyberpsychology, Behav Soc Netw. 2013;16(3):166–74.

Verma P, Khanday AMUD, Rabani ST, Mir MH, Jamwal S. Twitter sentiment analysis on Indian government project using R. Int J Recent Technol Eng. 2019 Sep 1;8(3):8338–41.

Burnap P, Colombo G, Scourfield J. Machine Classification and Analysis of Suicide-Related Communication on Twitter. 2015;

Ji S, Yu CP, Fung S-F, Pan S, Long G. Supervised Learning for Suicidal Ideation Detection in Online User Content. Hindawi Complex. 2018;2018:1–10.

Chadha A, Kaushik B. A Survey on Prediction of Suicidal Ideation Using Machine and Ensemble Learning. 2019;00(00).

Chiroma F, Liu HAN, Cocea M. Text Classification For Suicide Related Tweets. 2018 Int Conf Mach Learn Cybern. 2:587–92.