Skip to content

Mental-Health Text Classification

A controlled comparison on about 1k posts: TF-IDF with logistic regression beats a CNN-BiLSTM, and the write-up says so.

Year
2025
Role
Solo
Status
Private · client
Context
Lab
The executed notebook: macro-F1 by model, CNN-BiLSTM training curves over three seeds, and confusion matrices
NLP · Honest baselines2025

Results

  • 0.71

    macro-F1, 5-fold CV

    TF-IDF + logistic regression

  • 66%

    test accuracy

    CNN-BiLSTM: 56% over three seeds

Four classes (anxiety, depression, normal, suicidal) on a balanced 992-post public dataset. The question was whether a sequence model beats bag-of-n-grams linear models when data is scarce.

It doesn’t. TF-IDF + logistic regression reaches a 5-fold macro-F1 of 0.71 and 66% test accuracy; a properly trained CNN-BiLSTM (early stopping, dropout, three seeds) reaches 56%. Depression versus suicidal is the hardest distinction for every model. It is a course project and not a diagnostic tool.

Top of the notebook: the evaluation protocol and imports
Top of the notebook: the evaluation protocol and imports
Confusion matrices for logistic regression, random forest and the CNN-BiLSTM on the 100-post test set
Confusion matrices for logistic regression, random forest and the CNN-BiLSTM on the 100-post test set