Development of a Mental Health Classifier Using LSTM and Text Preprocessing Techniques

Authors

  • Priyo Haryoko Department of Computer, Faculty of Computer, Universitas Dian Nuswantoro, Indonesia Author
  • Abdul Syukur Department of Computer, Faculty of Computer, Universitas Dian Nuswantoro, Indonesia Author
  • Nova Rijati Department of Computer, Faculty of Computer, Universitas Dian Nuswantoro, Indonesia Author

DOI:

https://doi.org/10.15294/sji.v12i1.21216

Keywords:

LSTM, Mental health, Text preprocessing, Sentiment analysis, Social media

Abstract

Purpose: This study aims to address undiagnosed mental health conditions using social media for early detection. By applying advanced preprocessing techniques and LSTM models, the research improves classification accuracy for depression and PTSD. It highlights deep learning’s potential to process unstructured data and provides a scalable solution for real-world mental health monitoring.

Methods: Data was collected from Twitter using keywords like "depression" and "anxiety." Preprocessing included normalization, tokenization, stemming, and stopword removal. An LSTM-based model with GloVe embeddings, LSTM layers, and dropout was developed. The model’s performance was evaluated using metrics like accuracy, precision, recall, and F1-score to ensure robust and applicable results.

Result: The LSTM model achieved 90% accuracy, outperforming Random Forest (89%) and SVM (89%). Preprocessing steps like tokenization and stemming boosted performance by 15%. The model effectively captured temporal dependencies in text, showcasing its ability to analyze unstructured social media content for mental health detection.

Novelty: This study integrates advanced text preprocessing with LSTM to enhance mental health detection. Unlike traditional methods, it captures temporal nuances using GloVe embeddings. The scalable framework provides a reliable solution for real-world applications, paving the way for multilingual and cross-platform research in mental health analytics.

Downloads

Published

21-05-2025

Article ID

21216

Issue

Section

Articles

How to Cite

Development of a Mental Health Classifier Using LSTM and Text Preprocessing Techniques. (2025). Scientific Journal of Informatics, 12(1), 77-86. https://doi.org/10.15294/sji.v12i1.21216