Suicide has turned into a serious social problem in the world. With the expansion of social networking sites, many individuals utilize these platforms. This has enabled users to share their feelings, such as suicidal thoughts. Therefore, social media has provided opportunities that can be utilized to analyze people’s emotions. This study aims to apply a two-stage stacking ensemble method based on machine learning algorithms to detect suicidal thoughts in Reddit and Twitter posts. The dataset used in this paper is a combination of two separate datasets containing users’ Twitter and Reddit posts. In this research study, multiple techniques were utilized for feature extraction, and an updated ensemble method was implemented. Our study compared a one-stage stacking ensemble method and individual machine learning algorithms with a two-stage method, which showed superior performance in detecting suicidal ideation with higher accuracy, achieving an overall accuracy of 99.58%. The findings show that the right combination of features and using appropriate machine learning algorithms in stacking can provide high-level performance in recognizing suicidal thoughts.
Zarebnia, M. , Khoshhava, H. and Mirizadeh, D. (2026). Suicidal Ideation Detection on Social Media: A Machine Learning-Based Two-Stage Stacking Ensemble Framework. Preventive Counseling, 7(4), -. doi: 10.22098/jpc.2026.20135.1388
MLA
Zarebnia, M. , , Khoshhava, H. , and Mirizadeh, D. . "Suicidal Ideation Detection on Social Media: A Machine Learning-Based Two-Stage Stacking Ensemble Framework", Preventive Counseling, 7, 4, 2026, -. doi: 10.22098/jpc.2026.20135.1388
HARVARD
Zarebnia, M., Khoshhava, H., Mirizadeh, D. (2026). 'Suicidal Ideation Detection on Social Media: A Machine Learning-Based Two-Stage Stacking Ensemble Framework', Preventive Counseling, 7(4), pp. -. doi: 10.22098/jpc.2026.20135.1388
CHICAGO
M. Zarebnia , H. Khoshhava and D. Mirizadeh, "Suicidal Ideation Detection on Social Media: A Machine Learning-Based Two-Stage Stacking Ensemble Framework," Preventive Counseling, 7 4 (2026): -, doi: 10.22098/jpc.2026.20135.1388
VANCOUVER
Zarebnia, M., Khoshhava, H., Mirizadeh, D. Suicidal Ideation Detection on Social Media: A Machine Learning-Based Two-Stage Stacking Ensemble Framework. Preventive Counseling, 2026; 7(4): -. doi: 10.22098/jpc.2026.20135.1388