Machine Learning Framework for Early Detection of Mental Health Conditions from Textual Data
DOI:
https://doi.org/10.34123/icdsos.v2025i1.613Keywords:
Mental Health Detection, Textual Data Analysis, Machine Learning Algorithms, Early InterventionAbstract
Mental health disorders significantly affect global populations, placing heavy burdens on healthcare systems worldwide. Traditional diagnostic methods, mainly clinical assessments and self-reports, lack real-time monitoring, are prone to biases, and often result in delayed interventions. Recent advancements in machine learning (ML) offer promising opportunities to enhance mental health detection through behavioural and physiological data analysis. This study evaluates four widely used machine learning algorithms—Support Vector Machines (SVM), Logistic Regression, Naïve Bayes, and Random Forests—in identifying early indicators of mental health conditions from textual data. A dataset of 27,978 textual records from the “Analysis and Modelling on Mental Health Corpus” was analysed. Data preprocessing involved normalization, stop word removal, lemmatization, and TF–IDF vectorization to prepare robust features for model training. Model performance was assessed using accuracy, precision, recall, and F1-score metrics. Results showed that SVM and Logistic Regression outperformed other models, achieving accuracy rates of 92% and 91%. These findings demonstrate the potential of ML-based frameworks to support earlier and more accurate mental health interventions. Integrating such techniques into clinical practice can improve diagnostic accuracy, reduce healthcare workload, and enhance patient outcomes.