Early detection of depression is crucial for minimizing its adverse effects on mental and physical health. Recent advancements in natural language processing facilitate the large-scale analysis of social media texts to identify depressive tendencies. Our study introduces a novel approach by integrating a genetic algorithm for hyperparameter tuning, optimizing the classification performance beyond conventional methods. We provide a comprehensive comparison of vectorization techniques, including term frequency-inverse document frequency (TF-IDF), Word2Vec, and a fine-tuned bidirectional encoder representation from transformers (BERT) model specifically adapted to our dataset. Using a dataset of 7,731 entries, we implemented standard pre-processing steps such as stop word removal and lemmatization before vectorizing the text. Five machine learning algorithms—decision tree, logistic regression, random forest, gradient boosting, and support vector machine—were evaluated, with hyperparameter tuning performed using a genetic algorithm. The highest accuracy (95.99%) and F1-score (95.91%) were achieved with the combination of fine-tuned BERT, support vector machine, and genetic algorithm optimization. This study demonstrates the advantages of integrating BERT fine-tuning with genetic optimization, outperforming traditional TF-IDF and Word2Vec approaches in depression detection.
Collaboration network of the authors
4 authors ·
4 co-authorship links
· 2 across different organisations
Hover or tap a name to highlight its co-authors. Double-click to open the author's page.
Université Hassan 1er
Mohammed V University
Different organisations
Same organisation
Affiliation unknown
Thicker line = more joint articles · bigger circle = more articles
Affiliations come from OpenAlex; journal OAI-PMH metadata carries none. Authors without an OpenAlex ID are matched by name, which can merge or split people.