All projects

UMass Amherst · 2026

Mental Health Signal on Reddit

I pulled 6,398 posts and 19,488 comments out of three mental health subreddits and put three classifiers against each other on the sentiment labels. Every file is in the repo.

Context
UMass Amherst
Year
2026
Method
Python

This is the project I would hand someone first, because you can check all of it. The repository has the collection script, the raw CSVs, the scored CSVs, the model results and the dashboard.

PRAW pulls posts and comments from r/Anxiety, r/depression and r/mentalhealth. Every item gets scored three separate ways: VADER, TextBlob, and a HuggingFace transformer. I used three because lexicon-based sentiment and a fine-tuned model disagree in genuinely interesting places on text this personal, and I wanted to see where.

Then classification. TF-IDF features into logistic regression, a linear SVM and a random forest. Logistic regression and the random forest tied at 91.25 percent accuracy and 0.871 F1. The SVM came in at 90.63 and 0.868. Those three are closer to each other than any of them is to a careful reading of what the labels actually mean, and I think that is the honest thing to say about this kind of work.

The finding I would defend in a room is from the topic modelling. The clusters that came out are mostly not about mental health at all. They are about money, housing, politics and social media. The subreddit is where people go to talk about anxiety, and what they talk about is rent.

Classifier comparison, TF-IDF features. Figures are in ml_model_results.csv in the repo.
ModelAccuracyPrecisionRecallF1
Logistic Regression0.91250.83270.91250.8708
Random Forest0.91250.83270.91250.8708
Linear SVM0.90630.83220.90630.8676

Tools & methods

  • Python
  • PRAW
  • scikit-learn
  • NLTK VADER
  • Transformers
  • Plotly Dash