Reddit Depression Regimens cont’d

Previous posts on the topic of scraping reddit data from the depressionregiments subreddit:

Reddit Depression Regimens – Topic Modeling

Reddit Depression Regimens – Topic Modeling cont’d

Next we will create some plots with javascript. For example, it would be interesting to see how often specific psychotropic medications and supplements are mentioned in the text data.
Below is a chart with frequencies of the most common antidepressant medications. The counts were performed by combining the frequencies of the brand name and the chemical name (for example Wellbutrin count is wellbutrin (54) + bupropion (27) = 81).

The data was generated using python and exported as a .csv file, with columns ‘term’ and ‘freq’.

HTML part:

  <script src=""></script>
  <script src=""></script>
  <script src=""></script>
  <script type="text/javascript" src="script1.js"></script>
<body onload="draw()">
chart 1
<div id="jsdiv" style="border:solid 1px red"></div>
chart 2
<canvas id="chart"></canvas>

JS part:

function makeChart(meds) {
  // meds is an array of objects where each object is something like

  var hist_labels = {
    return d.term;
  var hist_counts = {
    return +d.freq;

  arrayOfObj =, i) {
      return {
        label: d,
        data: hist_counts[i] || 0
  sortedArrayOfObj = arrayOfObj.sort(function(a, b) {
      return -;

   newArrayLabel = [];
   newArrayData = [];

  var chart = new Chart('chart', {
    type: "horizontalBar",
    options: {
      maintainAspectRatio: false,
      legend: {
        display: false
    data: {
      labels: newArrayLabel,
      datasets: [
          data: newArrayData,
          backgroundColor: "#33AEEF"
    options: {
      scales: {
        yAxes: [{
          scaleLabel: {
            display: true,
            labelString: 'med name'
        xAxes: [{
            scaleLabel: {
                display: true,
                labelString: 'freq'
      legend: {
          display: false
      title: {
          display: true,
          text: 'Frequencies of common antidepressants'

// Request data using D3

We can generate charts with other medication/supplement lists using the same code. Below is a plot with frequencies of common antipsychotics. As you can see, antipsychotics are not mentioned that frequently as antidepressants, and a lot of names in the input list were not mentioned at all (such as haldol or thorazine), and therefore they do not show up in the chart.

Other medications and common supplements mentioned:

Reddit Depression Regimens – Topic Modeling cont’d

In the previous posts we applied LDA topic modeling to text documents from data collected from the subreddit depressionregimens. Here I will continue with the results from the derived topics model – obtaining the most representative text for each topic. As was stated, the chosen model has ten topics, and LDA assumes that each document is composed of multiple topics, with each topic being assigned a probability. Each topic is composed of multiple words, with each word assigned a probability.

Previous post: Reddit Depression Regiments – Topic Modeling

Since each document is composed of multiple topics, for each topic we can find a document with the highest probability for that topic, therefore that will be our most representative document.

Topic 1

(‘feel’, 0.040), (‘year’, 0.026), (‘thing’, 0.022), (‘symptom’, 0.020), (‘brain’, 0.019), (‘start’, 0.018), (‘time’, 0.017), (‘make’, 0.015), (‘issue’, 0.015), (‘lot’, 0.014)

Most representative post id with topic 1 probability of 0.45:
Full text here:

“Blank Mind Syndrome” – Sub group of specific symptoms including: – Loss of Internal Monologue, lack of coherent automatic thoughts, no track of time passage, lack of self insight – Depersonalisation/Derealization Feeling detached, having no “sense of self”, missing mental features, having no emotional autobiography, feeling as if every day is the same, loss of relationship or emotional attachments, feeling detached from external reality – Cognitive Decline, Loss of Visual imagination, inability to think in a deep or complex way, inability to hold information, loss of past learned skills and knowledge. – Complete Lack of goal-directed motivation, having no automatic self direction, no long term goals – Anhedonia – inability to enjoy or derive pleasure, nothing to look forward to, no bodily joy, satasfaction and so on – Lack of atmosphere/deepness of the outside reality, inability to appreciate beauty, things look flat and insignificant. All symptoms in various severity of course, It’s time to talk, what is this condition exactly, Did you suffer from depression your entire life? Is this episodic? how are you planning to solve it? how did you acquire it? had any professional been aware of it? Is it medication induced? Is there any outside outlet acknowledging this specific phenomena? How much time do you suffer from it? What were you diagnosed with? Was it sudden or progressively? Had anything helped at all? Would you join a group for people suffering the same condition? Is anyone interested in doing so? Please do respond!

Topic 2

people 0.044, depression 0.037, doctor 0.028, psychiatrist 0.020, make 0.020, bad 0.016, therapy 0.016, therapist 0.015, find 0.014, problem 0.013

Most representative post for this topic, with probability for topic 2 of 0.53:

I talked to him today, he says all my problems are my choice and I choose to be lazy, suicidal, depressed etc. Is he right?,Dude… if he believes this then he must also believe that his career is total quackery. Get a new psychiatrist immediately. What a piece of shit.,absolutely not, please get a new psychiatrist!! you don’t choose to be suicidal or depressed, and in my experience, depression causes laziness more often than not. it’s worrisome that a professional outright said this to you and honestly I would report him if you can. that’s such a harmful thing to say to anyone suffering from such issues and to say it to the wrong person could be really catastrophic. i’m sorry he’s a dick to you, don’t listen to his bullshit. if it was so easy as to choose not to be depressed then nobody would fucking be depressed. it’s like he thinks people enjoy feeling this way ugh,OMG please please PLEASE never go back there. I once had a psychiatrist tell me I was gonna end up on a street corner with a sign (spoiler alert: I have a career and own a house). I got up and left and never looked back. Remember that YOU are a huge part of your mental health journey. It’s a collaborative effort between you, your psychiatrist, therapist (if you have one), and any other professional you choose to involve. You always have a say, and if something doesn’t seem right, you don’t have to go along with it. Your feelings are ALWAYS valid—don’t ever let anyone tell you differently. You are not alone in this. So many of us are depressed, anxious, suicidal, attention deficit, bipolar, lazy…these are NOT choices. Who would choose to be this way? There are plenty of helpful professionals out there, just make sure you screen them carefully. I believe in you and wish you well!!! …

Topic 3

day 0.037, thing 0.035, feel 0.033, make 0.024, find 0.017, good 0.016, exercise 0.016, eat 0.013, walk 0.013, lot 0.013

Topic probability: 0.53

Wanted to share something that I’ve recently found to help when I’m struggling to find motivation to complete basic chores. This one specifically deals with laundry, but it can apply to other tasks as well. If you’re like me, you can have laundry sitting there for weeks not being put away. The mountain of clothing is so overwhelming that I just ignore it all together. I’m also an all-or-nothing person; I just wait and wait until a good day when I’ll have enough energy to get it done. Those days are exceedingly rare, so that mountain of clothes will sit there for a loooong time, stressing me out and depressing me even more. I’m trying to switch my mindset to not feeling like I need to take on such giant tasks all at once. I decided to break up the tasks into smaller ones. For the mixed load of laundry that needed to be put away, I told myself I only need to put away the socks and underwear today. Then tomorrow I put away the shirts. The next day, fold pants, and the next everything else that goes on hangers. These smaller tasks only take like 5-10 minutes each, and it’s satisfying to see the pile of clothes dwindle every day versus sit there ominously for several weeks. If you’re feeling overwhelmed, break up your tasks into very small, easily attainable goals. Go easy on yourself and do what you can for the day. Even just the tiniest amount of progress is a good thing.,great advice. ​ Anytime you get anxiety over a task or a situation seems to complex or overwhelming. Just break in down into manageable pieces. Doing SOMETHING is always better than nothing even if it seems like too little or not enough or w/e.,I saw a meme about ‘anything worth doing is worth doing badly’ that addresses this. I try and remember that some days. Us perfectionists want to always do 100%. But in a lot of things (not everything, obviously, just as a general rule) doing 50% of the job, or 90% of the job, is way better then the 0% of the job we do because of that crippling dedication to doing 100%. Not an excuse for doing bad jobs on the stuff that really matters, but can be a much healthier way to approach doing general day-to-day stuff…

Topic 4

ssris 0.027, antidepressant 0.024, effect 0.024, drug 0.022, side_effect 0.020, depression 0.019, serotonin 0.016, prescribe 0.014, treat 0.013, ssri 0.012

Reddit post:

Topic probability: 0.64

Hey y’all, this is a repost of the stickied post made by /u/jugglerofworlds, who appears to have deleted their account and their post along with it. I’ve edited it a little and will continue to keep it updated as needed. Suggestions are welcome. As the former post was, I’m trying to keep this confined to prescription medications, and not natural/herbal remedies (though I recognize that they definitely can be helpful means of treatment). I’m also typically avoiding medications that have been withdrawn from the market and thus aren’t really prescribed. In a future revision of this post I hope to add an additional column featuring which medications are available where, as some of these are approved in European countries but not in the U.S., and vice versa. # Icon key * ✔️ = approved to treat condition by a regulatory agency (FDA, EMA, ANSM, etc) * ➕ = approved as an adjunct treatment by a regulatory agency, to be used in combination with other medications to treat a condition (may or may not be used off-label as a monotherapy) * 🏷️ = Off label use; widely prescribed for condition but not necessarily rigorously studied for it * ⚠️ = experimental medication; in FDA Phase III trials or pending approval # Selective Serotonin Reuptake Inhibitors (SSRIs) |Generic name|Brand name(s)|Treats depression|Treats anxiety| |:-|:-|:-|:-| |citalopram|Celexa|✔️|🏷️| |escitalopram|Lexapro|✔️|✔️| |fluoxetine|Prozac|✔️|✔️| |fluvoxamine|Luvox/Luvox CR|✔️|✔️| |paroxetine|Paxil/Paxil CR|✔️|✔️| |sertraline|Zoloft|✔️|✔️| # Serotonin Modulator and Stimulators (SMS) |Generic name|Brand name(s)|Treats depression|Treats anxiety| |:-|:-|:-|:-| |vortioxetine|Trintellix|✔️|🏷️| |vilazodone|Viibryd|✔️|🏷️| # Serotonin-Norepinephrine Reuptake Inhibitors (SNRIs) |Generic name|Brand name(s)|Treats depression|Treats anxiety| |:-|:-|:-|:-| |venlafaxine|Effexor/Effexor XR|✔️|✔️| |desvenlafaxine|Pristiq|✔️|🏷️| |duloxetine|Cymbalta|✔️|✔️| |milnacipran|Savella|✔️|✔️| |levomilnacipran|Fetzima|✔️|🏷️| |atomoxetine|Strattera|⚠️|⚠️| # Tricyclics (TCAs) ## TCAs with a preference for serotonin |Generic name|Brand name(s)|Treats depression|Treats anxiety|…

Topic 5

treatment 0.035, ketamine 0.028, year 0.022, work 0.021, drug 0.017, hope 0.015, hear 0.012, lithium 0.011, people 0.010, infusion 0.009

Reddit post:

Topic probability: 0.58 ​ The Food and Drug Administration approved a novel antidepressant late Tuesday for people with depression that does not respond to other treatments — the first in decades to work in a completely new way in the brain. The drug, a nasal spray called esketamine, has been eagerly anticipated by psychiatrists and patient groups as a powerful new tool to fight intractable depression. The spray acts within hours, rather than weeks or months as is typical for current antidepressants, and could offer a lifeline to about 5 million people in the United States with major depressive disorder who haven’t been helped by current treatments. That accounts for about one in three people with depression. “This is undeniably a major advance,” said Jeffrey Lieberman, a Columbia University psychiatrist. But he cautioned much is still unknown about the drug, particularly regarding its long-term use. “Doctors will have to be very judicious and feel their way along,” he said. The label for the drug will carry a black box warning – the most serious safety warning issued by the FDA. It will caution users they could experience sedation and problems with attention, judgment and thinking, and that there’s potential for abuse and suicidal thoughts. People who take esketamine will have to be monitored for at least two hours after receiving a dose to guard against some of these side effects…

Topic 6

work 0.053, anxiety 0.030, mg 0.025, bad 0.020, high 0.020, vitamin 0.018, diet 0.015, supplement 0.014, post 0.012, literally 0.011

Reddit post:

Topic probability: 0.52

About 3 or 4 years ago, I developed a severe form of anxiety disorder where it manifested in panic attacks characterized by intense bouts of nausea, gagging, and retching. It didn’t usually get bad enough to get to vomiting, though it did in a few instances (in which I went to the hospital afterwards). My body responds to stress naturally by gagging and nausea. So imagine being anxious all the time but also NAUSEOUS 24/7, and I mean literally 24/7 without any respite. At times I was seriously considering suicide because of how bad I felt all the time every day. The whole thing started I think because I had to present at a large conference with thousands of people in attendance, and I had a very bad experience being insulted by some people at a previous iteration of this conference years ago. I was commuting to work one day (before the conference) and suddenly got this massive bout of nausea where I felt like I was dying. I realized however that this was my body telling me I have stagefright. I expected my nausea to evaporate once I finished speaking, as it usually would have in the past. Except that it didn’t. It stayed, and remained with me for years. I tried everything but avoided antidepressants for the longest time due to the bad rep they get. I tried the following medications: * Ginger – in various forms – for nausea (didn’t work) * Peppermint – in various forms – for nausea (didn’t work) * Ondansetron (zofran) – 4 mg; as needed – for nausea (didn’t work) * Chlordiazepoxide/clidinium bromide (librax) – 5 mg; once daily – for nausea and anxiety (didn’t work) * Pyridoxine/doxylamine (diclectin) – 10 mg pyridoxine, 10 mg doxylamine; 2 tablets at bedtime – for nausea (didn’t work) * Metoclopramide – 1 tablet daily – for nausea (didn’t work) * Domperidone – 10 mg; once daily – for nausea (didn’t work) * Propranolol – 10 mg; twice daily – for anxiety (didn’t work) * Prochlorazapine – 10 mg; twice daily – for nausea (didn’t work) * Lorazepam (Ativan) – 1 mg; 1 tablet at bedtime – for anxiety (didn’t work; just made me really sleepy) * Pantoprazole (Tecta) – 1 tablet daily – for nausea (didn’t work) * Dimenhydrinate (Gravol) – 1 tablet as needed – for nausea (didn’t work) * Nabilone (cesamet) – 0.5 mg as needed – for nausea (worked for nausea but not anxiety, and gave me a really uncomfortable high) * Clomipramine (Anafranil) – 10 mg. once daily – for anxiety (didn’t try properly due to side-effects) I was afraid even of getting out of my own house. I was afraid of meeting people. I was afraid of leaving my own room – the only place where I felt somewhat at ease and the nausea wasn’t THAT bad. The only thing that worked somewhat to relieve the nausea was chewing on things, whether that meant food at mealtimes, or fennel seeds, or sucking on mints/cough drops. So I carried mints and fennel seeds with me at all times no matter where I was – including in the washroom in my own house and even when I wanted to take a shower I had to have them nearby otherwise I would literally throw up in the shower. But these were not long-term cures to my problem and only a short alleviation of the symptoms (and not that effective if I was more anxious than usual). I somehow graduated from university with a degree in neuroscience and fought through this nausea-anxiety for 2 years doing so. My graduation ceremony – which was supposed to be a happy occasion – was marred by constant nausea and me going through at least 3 entire tins of mints because my body handles excitedness the same way as it does for anxiety. Literally nothing was working and I was at my wit’s end. So I went downtown Toronto and bought CBD oil from a dispensary. I only did this because I was literally desperate, even though I had never done any recreational drugs in my life upto that point (except caffeine), and even though I had a horrible experience with nabilone (synthetic THC for cancer patients to reduce their nausea) so I was really kind of anxious about even using that. But it worked…

Reddit Depression Regimens – Topic Modeling

Text data (top posts and top comments for those posts) was downloaded from the subreddit depression regimens ( Data was grouped by post id, in total there were 101 such ids, therefore 101 text documents. After collecting the data, the following data cleaning steps were performed:

  • any emails were removed from text
  • urls were removed (http and www)
  • common contractions were expanded (‘ain’t >> ‘is not’; ‘bday’ >> ‘birthday’; ‘don’t’ >> ‘do not’; etc.)
  • new line characters were removed
  • single quotes were removed

After the data cleaning steps were complete, sentences were tokenized into words, and punctuation was removed. English stop words were removed from documents. Python’s gensim.models.phrases.Phraser() was used in order to detect common phrases (bigrams). Lemmatization was then performed and part of speech tagging (POS). Only lemmatized words with certain POS tags were kept, including nouns, adjectives, verbs, adverbs, and proper nouns. Proper nouns were kept in case medication or supplement names get tagged as such. We are interested in how reddit users describe their experiences with certain psychotropic medications and supplements, and therefore the chosen POS tags are the ones that are relevant for descriptions.

An example of an original post is presented below. As a human, we can decipher that the post below is about ketamine and that the user had a positive experience with this treatment. We would be interested in the verbs, adverbs, adjectives, and nouns, that the author used to describe their experience.

I wanted to post this to give hope to those who need a little extra. I know how excruciating both having and battling treatment options for depression and anxiety can be. I’ve seen what I thought was rock bottom. I’ve been to my actual rock bottom, but I am free now.

One year ago, I was sitting in the recliner at my local ketamine clinic receiving my first infusion. The day before I had outlined my plan for suicide and had all my affairs in order, but a friend I had confided in about my depression had a “feeling” I was in a very dangerous place inside my head. I don’t know how she knew what I was planning, but thank goodness she had the foresight and the strength to push me to try one. more. thing. I had heard (and shared) quite a few podcasts from people who had been through treatment, administered the treatments, and even those who had been doing the research behind it all. had been chatting about ketamine as a potential treatment since nothing else had ever worked. She researched clinics, called them all to pick the best one, and made the appointment on an urgent basis getting me in that day.

She took me to the doctor, and after a while, I told him about my plan. I told him that I would give this a try, but this was my last try. After 25 years of my brain being a lab rat for every pill imaginable, years and years of therapy and everything else you can imagine, I was just so tired. He was sympathetic, caring and sat with me for quite a while. Then he started that first IV.

I won’t bore you with all the details of treatment (feel free to ask), but I can say that after the first treatment – one year ago today – I didn’t want to die anymore. I haven’t wanted to since. From time to time, the depression will creep in a little too much for comfort, but I have a lot of self-care tricks to help me get through it. And if It comes down to it, I go in for a booster treatment.
In the past year, I have had 11 infusions. The last 3 were to help me get off the last, and most difficult antidepressant that I ever took. Now, I’m on a very low dose of Lexapro, which I honestly doubt I even need. But I’m stable. I actually know what happiness feels like. And most importantly, I’m alive.
Thanks for reading.

After we perform the steps described above – data cleaning, removing stop words, lemmatization, and keeping only terms with specific POS tags, extract common bigrams, the post above results in the following:

want post give hope need little extra know excruciating battle treatment option depression anxiety see think rock bottom actual rock bottom free year ago sit recliner local ketamine clinic receive first infusion day outline plan suicide affair order friend confide depression feel dangerous place head know know plan thank goodness foresight strength push try thing hear share quite podcast people treatment administered treatment even research chat ketamine potential treatment else ever work research clinic call pick good make appointment urgent basis get day take doctor tell plan tell would give try last try year brain lab rat pill imaginable year year therapy else imagine tired sympathetic caring sit quite start first bear detail treatment feel free ask say first treatment year ago today want die anymore want time time depression creep little much comfort lot self_care trick help come go booster treatment year infusion last help last difficult antidepressant ever take low_dose lexapro honestly doubt even need stable actually know happiness feel importantly alive thank read

In regards to topic modeling, we are interested in the general topics that are discussed in this particular subreddit, Latent Dirichlet Allocation (LDA) can be used specifically for this sort of task. LDA is an unsupervised method for finding topics in text data. Our text is composed of documents, in this case each document is a combination of a post and top comments for a specific post id. LDA assumes that each document is composed of different topics and each topic is composed of different words. Therefore documents can contain overlapping topics and topics can contain overlapping words, but the probabilities for those topics and words will be different.

Since the problem is unsupervised, there are no labels, just text, and we don’t know how many topics there are in our subreddit. There is no exact formula to determine the optimal number of topics for the LDA model. One common way, that we will implement here, is to loop through different number of topics and calculate coherence scores. Then we should choose the model with the highest coherence score. In this specific case, I implemented models for 2, 4, 8, …, 14 topics, and plotted the corresponding coherence scores. As we can see from the chart, the highest value occurs when the number of topics is four, also we see peaks at 10 and 12 topics.

Now let’s see what the topics are.

Number of topics = 4

Topic 1 wordsWord probTopic 2 wordsWord probTopic 3 wordsWord probTopic 4 wordsWord prob

If we choose 10 topics:

Topic 1 wordsWord probTopic 2 wordsWord probTopic 3 wordsWord probTopic 4 wordsWord probTopic 5 wordsWord prob
Topic 6 wordsWord probTopic 7 wordsWord probTopic 8 wordsWord probTopic 9 wordsWord probTopic 10 wordsWord prob

I think that even with this small sample size – 101 top posts and corresponding top comments, LDA results provide us with a good understanding of what users discuss in the depressionregimens subreddit. There are discussions about life, feeling depressed, for how long the depression has been going on (mentions of week/month/year), mentions of how the day goes (Topic 7), mentions of specific treatments (Topic 4), supplements (Topic 5), SSRIs and side effects (Topic 3), exercise (Topic 2).

It’s possible to then apply the chosen model to each document in order to obtain the topics distribution by document. For example, we can choose the model with 10 topics, obtain topics distribution by document, and determine the topic with the maximum probability for each document. Then we can select sample documents that have the highest probability for a given topic. If we choose topic 2, which contains the following word distribution:

(‘people’, 0.04), (‘depression’, 0.038), (‘doctor’, 0.028), (‘psychiatrist’, 0.020),
(‘make’, 0.020), (‘bad’, 0.016), (‘therapy’, 0.016), (‘therapist’, 0.015), (‘find’, 0.014),
(‘problem’, 0.013)

We can find documents that have the maximum probability for topic 2:

“This might be an unconventional treatment considering that many of us post about their experience with various drugs.
I myself struggled with mental health in the past. I can say my mental health issues in the past were to 90% biological (hormonal problems). Once I treated the causes, over time the upwards spiral in my personal wellbeing (and life in general) started again.
In early twenties, my life was starting to go down the gutter. My life started to fall apart in every domain. I was severely depressed. I found out that some of my hormones were very low. I started hormone replacement. Whereas before my life was a nightmare, it has been great ever since. I could even get off the SSRIs I was on.
I wrote an article about my journey. How Hormones Destroyed and Saved My Life.
My dream is to live in a world where no one is held back from living an at least decent life the way I was. Even though not my fault, it is my life. And thus my responsibility. Without accepting and acting on that I just don´t know where I would be today. For sure I wouldn´t be writing this. Hope you find value in it… “

(Can read full text at )

The topics distribution for this document is as follows:
[1: 0.074, 2: 0.338, 3: 0.032, 4: 0.069, 5: 0.083, 6: 0.084, 7: 0.052, 8: 0.054, 9: 0.073, 10: 0.153]

Lemmatized text:

[‘may’, ‘unconventional’, ‘treatment’, ‘consider’, ‘many’, ‘us’, ‘post’, ‘experience’, ‘various’, ‘drug’, ‘struggle’, [‘may’, ‘unconventional’, ‘treatment’, ‘consider’, ‘many’, ‘us’, ‘post’, ‘experience’, ‘various’, ‘drug’, ‘struggle’, ‘mental_health’, ‘say’, ‘mental_health’, ‘issue’, ‘biological’, ‘hormonal’, ‘problem‘, ‘treat’, ’cause’, ‘time’, ‘upwards’, ‘spiral’, ‘personal’, ‘wellbeing’, ‘life’, ‘general’, ‘start’, ‘early’, ‘twenty’, ‘life’, ‘start’, ‘go’, ‘gutter’, ‘life’, ‘start’, ‘fall’, ‘apart’, ‘domain’, ‘severely_depresse’, ‘find‘, ‘hormone’, ‘low’, ‘start’, ‘hormone’, ‘replacement’, ‘life’, ‘nightmare’, ‘great’, ‘ever’, ‘since’, ‘could’, ‘even’, ‘ssris’, ‘write’, ‘article’, ‘journey’, ‘hormone’, ‘destroy’, ‘save’, ‘life’, ‘dream’, ‘live’, ‘world’, ‘hold’, ‘back’, ‘live’, ‘least’, ‘decent’, ‘life’, ‘way’, ‘even’, ‘fault’, ‘life’, ‘thus’, ‘responsibility’, ‘accept’, ‘act’, ‘know’, ‘would’, ‘today’, ‘sure’, ‘write’, ‘hope’, ‘find‘, ‘value’, ‘opinion’, ‘replace’, ‘hormone’, ‘deficient’, ‘far’, ‘natural’, ‘also’, ‘effective’, ‘artificial’, ‘med’, ‘however’, ‘believe’, ‘hormone’, ‘deficiency’, ‘may’, ‘much’, ‘common’, ‘assume’, ‘people‘, ‘never’, ‘get’, ‘hormone’, ‘check’, ‘often’, ‘even’, ‘life’, ‘want’, ‘give’, ‘head’, ‘other’, ‘pull’, ‘trigger’, ‘medication’, ‘claim’, ‘medication’, ‘work’, ‘hormone’, ‘check’, ‘opportunity’, ‘cost’, ‘high’, ‘similar’, ‘experience’, ‘hormone’, ‘hormone’, ‘dangerous’, ‘play’, ‘make‘, ‘sure’, ‘talk’, ‘doctor‘, ‘monitor’, ‘doctor‘, ‘lock’, ‘post’, ‘people‘, ‘would’, ‘see’, ‘unlocked’, ‘pm’, ‘otherwise’, ‘leave’, ‘lock’, ‘play’, ‘hormone’, ‘medical’, ‘supervision’, ‘highly’, ‘detrimental’, ‘health’, ‘thyroid’, ‘hormone’, ‘deficient’, ‘know’, ‘other’, ‘start’, ‘take’, ‘mcg’, ‘thyroxine’, ‘treat’, ‘hypothyroidism’, ‘run’, ‘family’, ‘fog’, ‘seem’, ‘lift’, ‘agree’, ‘hormone’, ‘underrated’, ‘come’, ‘depression‘, ‘thank’, ‘share’, ‘hormone’, ‘specifically’, ‘testosterone’, ‘direct’, ‘correlation’, ‘dopamine’, ‘high’, ‘test’, ‘high’, ‘dopamine’, ‘vice’, ‘versa’, ‘generally’, ‘testerone’, ‘wellbutrin’, ‘increase’, ‘libido’, ‘endocrine’, ‘system’, ‘research’, ‘seem’, ‘lag’, ‘research’, ‘treatment’, ‘know’, ‘million’, ‘could’, ‘suffer’, ‘needlessly’, ‘ignore’, ‘op’, ‘entire’, ‘post’, ‘structure’, ‘sway’, ‘people‘, ‘way’, ‘link’, ‘closing’, ‘paragraph’, ‘also’, ‘spamme’, ‘numerous’, ‘time’, ‘different’, ‘thing’, ’cause’, ‘depression‘, ‘know’, ‘enough’, ‘dark’, ‘age’, ‘exclusive’, ‘seratonin’, ‘hormone’, ‘receptor’, ‘regulation’, ‘drug’, ‘abuse’, ‘dopamine’, ‘ach’, ‘brain’, ‘damage’, ‘gaba’, ‘glutamate’, ‘imbalance’, ‘relate’, ‘several’, ‘brain’, ‘region’, ‘receptor’, ‘site’, ‘together’, ‘hormone’, ‘conversion’, ‘chain’, ‘adhd’, ‘bp’, ‘level’, ‘bdnf’, ‘several’, ‘type’, ‘disease’, ‘additionally’, ‘low’, ‘end’, ‘hormone’, ‘scale’, ‘total’, ‘free’, ‘may’, ‘feel’, ‘symptom’, ‘other’, ‘would’, ‘conversely’, ‘man’, ‘may’, ‘almost’, ‘nil’, ‘estrogen’, ‘high’, ‘estrogen’, ‘side_effect’, ‘decent’, ‘doctor‘, ‘full’, ‘blood’, ‘panel’, ‘hormone’, ‘panel’, ‘include’, ‘ask’, ‘depend’, ‘free’, ‘go’, ‘private’, ‘cost’, ‘uk’, ‘take’, ‘important’, ‘relative’, ‘commit’, ‘find‘, ‘thyroid’, ‘level’, ‘way’, ‘back’, ‘thyroid’, ‘problem‘, ‘handle’, ‘psych’, ‘med’, ‘need’, ‘depression‘, ‘probably’, ‘lifelong’, ‘become’, ‘unmanageable’, ‘thyroid’, ‘cancer’, ‘luckily’, ‘old’, ‘easy’, ‘catch’, ‘get’, ‘point’, ‘hormone’, ‘low’, ‘find‘, ‘hormone’, ‘check’, ‘yearly’, ‘perfectly’, ‘normal’, ‘even’, ‘high’, ‘yet’, ‘still’, ‘depressed’, ‘hormone’, ‘may’, ‘help’, ‘people‘, ‘many’, ‘still’, ‘depress’, ‘physiological’, ‘duck’, ‘row’, ‘infuriate’, ‘many’, ‘doctor‘, ‘refuse’, ‘prescribe’, ‘hrt’, ‘guess’, ‘taboo’, ‘medical’, ‘school’, ‘pull’, ‘tooth’, ‘find‘, ‘decent’, ‘doctor‘, ‘even’, ‘consider’, ‘apparently’, ‘fear’, ‘cancer’, ‘induce’, ‘hormone’, ‘frankly’, ‘rather’, ‘live’, ‘good’, ‘life’, ‘even’, ‘mean’, ‘get’, ‘cancer’, ‘live’, ‘cancer’, ‘free’, ‘life’, ‘mentally’, ‘miserable’, ‘post’, ‘multiple’, ‘account’, ‘whole’, ‘time’, ‘person’, ‘post’, ‘often’, ‘article’, ‘different’, ‘account’, ‘sometimes’, ‘claim’, ‘last’, ‘year’, ‘biology’, ‘student’, ‘other’, ‘last’, ‘year’, ‘medicine’, ‘student’, ‘post’, ‘lame’, ‘excuse’, ‘lure’, ‘costumer’, ‘hormetheu’, ‘thank’, ‘share’, ‘disregard’, ‘irrational’, ‘post’, ‘intelligent’, ‘enough’, ‘determine’, ‘right’, ‘see’, ‘sort’, ‘ground’, ‘swell’, ‘business’, ‘activity’, ‘even’, ‘touch’, ‘consultation’, ‘hormone’, ‘way’, ‘business’, ‘s’, ‘even’, ‘well’, ‘talk’, ‘get’, ‘free’, ‘professsional’, ‘guidance’, ‘think’, ‘people‘, ‘stick’, ‘depression‘, ’cause’, ‘people‘, ‘pursue’, ‘treatment’, ‘may’, ‘save’, ‘life’, ‘know’, ‘firsthand’, ‘appropriate’, ‘way’, ‘respond’, ‘tell’, ‘support’, ‘other’, ‘say’, ‘mother’, ‘first’, ‘tell’, ‘hit’, ‘would’, ‘sit’, ‘kitchen’, ‘table’, ‘cry’, ‘uncontrollably’, ‘start’, ‘hrt’, ‘right’, ‘take’, ‘nurse’, ‘year’, ‘tortuous’, ‘severe’, ‘depression‘, ‘ask’, ‘do’, ‘hormone’, ‘panel’, ‘flabbergast’, ‘go’, ‘lowt’, ‘men’, ‘health’, ‘center’, ‘addition’, ‘find‘, ‘severely’, ‘low’, ‘receive’, ‘great’, ‘man’, ‘health’, ‘care’, ‘know’, ‘funny’, ‘deduce’, ‘man’, ‘mid’, ‘life’, ‘crisis’, ‘hormone’, ‘imbalance’, ‘likely’, ‘low’, ‘get’, ‘ball’, ‘bust’, ‘buy’, ‘corvette’, ‘woman’, ‘get’, ‘sympathy’, ‘go’, ‘change’, ‘enough’, ‘question’, ‘come’, ‘first’, ‘opinion’, ‘testosterone’, ‘brain’, ‘get’, ‘testosterone’, ‘shot’, ‘help’, ‘put’, ‘dent’, ‘depression‘, ‘make‘, ‘feel’, ‘well’, ‘still’, ‘leave’, ‘pretty’, ‘severe’, ‘depression‘, ‘admittedly’, ‘hormone’, ‘vitamin’, ‘could’, ‘do’, ‘aggressively’, ‘recently’, ‘do’, ‘put’, ‘brain’, ‘glide’, ‘path’, ‘depression‘, ‘amazing’, ‘think’, ‘fix’, ‘fix’, ‘brain’, ‘still’, ‘aggressively’, ‘pursue’, ‘low’, ‘hear’, ‘cortisol’, ‘kill’, ‘testosterone’]

Neural Network Predicting Subreddit Karma and Comments for Mental Health Topics


Problem Description:

This project analyses whether the attributes of the subreddit posts’ content are predictive of social support (karma points and number of comments) posts receive.

Context of the Problem:

Mental health problems tend to go under-reported and under-addressed, which places a high social-economic cost on the society. Research shows that social support is valuable for improving quality of life for people with mental health illnesses.

This project examines what content attributes of anonymous social media posts on reddit platform elicit higher levels of social support in the form of karma points and comments.

Limitation About other Approaches:

We have examined two most relevant papers on the topic, [1] and [2]. Neither Schrading, N. et al. [1], nor De Choudhury, M. & De, S. [2] use subreddit indicator variables (i.e., indicators for schizophrenia, depression, anxiety, etc.) in their analysis. It is likely that posts are treated differently, depending on a mental illness indicated (as per Mann, C. E. & Himelein, M. J. [3], “stigmatization of schizophrenia was significantly higher than stigmatization of depression”). Also, De Choudhury, M. & De, S. [2] used a resource intensive manual labelling approach to arrive at keywords.


In this project, the analysis includes subreddit indicators in the neural network model predicting social supports for reddit posts. The figure below shows statistics for subreddit indicators for a sample dataset. It can be seen that the mean for the target variables is very different between subreddits.

Additional inputs include counts of frequent bigrams and emotion labelling of keywords. Emotion labelling was done through an NLP approach, using an already existing emotions lexicon.


Schrading, N. et al. [1]They trained and compared multiple classifiers on content of reddit posts to determine the top semantic and linguistic features in detecting abusive relationships. Subreddit posts with comments that focus on domestic abuse, plus subreddit posts with comments unrelated to domestic abuse as a control set.Future studies could be implemented on datasets from multiple websites to compare online abuse patterns across forums.
De Choudhury, M. & De, S. [2]They trained a negative binomial regression model on content of reddit posts (i.e., length, use of 1st pronoun, relationship words, emoticons, positive and negative words, etc.) to predict social support variables (karma points and number of responses).Posts, comments and associated metadatafrom several mental health subreddits, including alcoholism, anxiety, bipolarreddit, depression,mentalhealth, MMFB (Make Me Feel Better), socialanxiety, SuicideWatch.– Out of the top 15 discussed predicting variables used in the regression model, the highest coefficient have the intercept and the use of the 1st pronoun. – There is no discussion about correlations between predicting variables (for example, the study uses such variables as negative emotion, positive emotion and number of emoticons, which could be correlated).


Schrading, N. et al. [1] reported that out of the post features they analyzed, ngrams were the most predicting ones when detecting abusive relationships in reddit posts. De Choudhury M. & De, S. [2] tried to predict social support variables for mental health related reddit posts using post length, emoticons, unigrams, variables built based on presence of emotionally charged unigrams, etc.

In this project, to predict social support variables (scores and number of comments) for mental health related reddit posts, the model was built using the neural networks approach and with emotionally charged unigrams as indicators of 10 different emotions, emotions count, post length, part of speech frequencies (counts of verbs, pronouns, adverbs and adjectives), count of first pronouns, number of question marks, post length, count of frequent bigrams, and subreddit indicators as predictive variables.

Below is the list of the input used in the models for predicting the score and number of comments:

‘anger’, ‘anticipation’, ‘disgust’, ‘fear’, ‘joy’, ‘negative’, ‘positive’, ‘sadness’, ‘surprise’, ‘trust’,’len_post’, ‘len_post_orig’, ‘first_pronoun_count’, ‘freq_bigram_count’, ‘q_count’, ‘verb_count’, ‘pronoun_count’,’adverb_count’, ‘adjective_count’, Subreddit(display_name=’BipolarReddit’), Subreddit(display_name=’Anxiety’), Subreddit(display_name=’depression’), Subreddit(display_name=’schizophrenia’), Subreddit(display_name=’bipolar’), Subreddit(display_name=’mentalhealth’), Subreddit(display_name=’depression_help’), Subreddit(display_name=’BPD’), Subreddit(display_name=’socialanxiety’), Subreddit(display_name=’mentalillness’)

Emotion lexicon

A public lexicon dataset was used to determine counts of specific emotion words. The NRC Emotion Lexicon is a list of English words and their associations with eight basic emotions (anger, fear, anticipation, trust, surprise, sadness, joy, and disgust) and two sentiments (negative and positive).

Below are examples of posts with most frequent bigrams highlighted. Frequent bigrams ‘feel like’, ‘feels like’ are consistent with the finding by De Choudhury M. & De, S. [2] of frequent unigrams related to emotional expression.


For this project we identified most popular bigrams and trigrams. The counts of most frequent bigrams and trigrams were used while testing various models, and the most useful data turned out to be counts of most frequent 16 bigrams, which were used as one of the inputs to the model.

Below is the list of the most popular bigrams used and a few examples of their usage in raw texts.


Data Collection

Obtained data via a public API from 10 mental health subreddits: “depression”, “anxiety”, “bipolarreddit”, “mentalhealth”, “socialanxiety”, “depression_help”, “bipolar”, “BPD”, “schizophrenia”, and “mentalillness”.

  • First, checking 10 hot posts for each subreddit indicator
  • Collecting data

top_posts dimensions: (9949, 9)

hot_posts dimensions: (9890, 9)

new_posts dimensions: (9896, 9)

Preparing the Data

reddit data scraping is limited to a maximum of 1000 records per subreddit per each of 3 post categories (“hot”, “top” and “new” posts). To maximize the dataset size, we collected posts of all 3 categories and removed duplicate records that have categories overlapping. As mentioned by De Choudhury M. & De, S. [2], reddit posts reach most of their commentary within the first 3 days from being posted. Thus, we removed posts that were “younger” than 3 days old at the data collection time.

  • Removing stop words and punctuation
  • Created ngrams (bigrams, trigrams and fourgrams)
  • Applying smoothing for trigrams and removing extra words referring to posts, unrelated to this analysis (i.e., moderator’s posts)
  • Creating emotions dataframe, count POS (part of speech) tags, and topic/subreddit dummies

Reddit score prediction model – results based on first layer weights:
In a multi-layer neural network it is hard to interpret raw internal weights, but it looks like mental health-specific variables (such as indicators for fear or surprise, or subreddit indicators) are more important than generic (such as verb count or the length of the post, which looks to be least useful). In particular most subreddit indicators (“depression_help”, “depression”, “schizophrenia”, etc.), which were not used in other papers, are in top 10 for total weights.

Conclusion and Future Direction

In conclusion, neural network results showed that the model inputs do have some predictive power for social response variables ‘number of comments’ and ‘score’, as the sums of weights for input variables were found to be greater than zero. Also during model testing, starting with fewer input variables, adding the rest of the input variables reduced the absolute mean errors.

One of the future improvements for this analysis could be incorporating a variable that indicates whether the post is from a throwaway account or an existing long-term reddit account, as De Choudhury, M. & De, S. [2] mention that reddit’s throwaway accounts allow individuals to express themselves more honestly and to ‘discuss uninhibited feelings’.

Also, while content and length of post titles and how users action on posts (click, read, and reply) might have an impact on post’s score, neither of the research papers cited, nor this analysis used title analysis as a part of the model. As such adding title attributes and post actioning statistics variables to the model could be a potential area for improvement.


[1]: Schrading, N., Alm, C. O., Ptucha, R., & Homan, C. M. An Analysis of Domestic Abuse Discourse on Reddit, The 2015 Conference of Empirical Methods in Natural Language Processing, Lisbon, Portugal, September 2015, pages 2577-2583.

[2]: De Choudhury, M. & De, S. Mental Health Discourse on reddit: Self-Disclosure, Social Support, and Anonymity. Eights International AAAI Conference on Weblogs and Social Media, North America, May 2014, pages 71-80. Available at:

[3] Mann, C. E. & Himelein, M. J. Factors Associated with Stigmatization of Persons with Mental Illness. Psychiatric Services, Vol. 55, No. 2., February 2004, pages 185-197. Available at: