Detecting Depression: Employing Natural Language Processing and Random Forests
摘要
Depression is not just a sad feeling, but a serious mental illness. This paper seeks to use Machine Learning to predict Depression in a given text. Based on the idea that text written by sufferers of Depression differs from text written by persons without depression, we seek to extract Natural Language Processing features (namely Term Frequency-Inverse Document Frequency or TF-IDF features) from a dataset of texts written by Depressed and non-Depressed people. We employ these features and train supervised learning (Random Forest) classification models to classify the text into one of two different classes: Depressed and non-Depressed. We also perform varying levels of Mutual Information-based Feature Selection of the TF-IDF features to compare and analyse the effects of feature selection on the performance of our models. By using our curated dataset of anonymized text posts from Reddit (291 Depression and 698 Control posts), our best model achieves a classification F1-Score of 93.24% and a classification accuracy of 93.21% on a test dataset, serving as a testament to the various possibilities of using Machine Learning in the field of detecting mental illnesses and disorders (Depression and similar disorders) at a larger scale.