Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 3 new columns ({'is_confusing_keyword_type', 'sub_topic', 'category'}) and 4 missing columns ({'is_edge_case', 'style', 'condition', 'related'}).

This happened while the csv dataset builder was generating data using

hf://datasets/AbdullahImran/Mental-Health-Classification-Dataset/data/non_mental_health.csv (at revision ae431932f35a4ad4a68beb8470360b8798f82d98), ['hf://datasets/AbdullahImran/Mental-Health-Classification-Dataset@ae431932f35a4ad4a68beb8470360b8798f82d98/data/mental_health.csv', 'hf://datasets/AbdullahImran/Mental-Health-Classification-Dataset@ae431932f35a4ad4a68beb8470360b8798f82d98/data/non_mental_health.csv']

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1848, in _prepare_split_single
                  writer.write_table(table)
                  ~~~~~~~~~~~~~~~~~~^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 765, in write_table
                  self._write_table(pa_table, writer_batch_size=writer_batch_size)
                  ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 773, in _write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              category: string
              sub_topic: string
              title: string
              content: string
              is_mental_health: bool
              is_confusing_keyword_type: bool
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 1010
              to
              {'condition': Value('string'), 'style': Value('string'), 'title': Value('string'), 'content': Value('string'), 'is_mental_health': Value('bool'), 'is_edge_case': Value('bool'), 'related': Value('float64')}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~^
                      builder, max_dataset_size_bytes=max_dataset_size_bytes
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1694, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^
                      gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  ):
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1850, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
                  ...<4 lines>...
                  )
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 3 new columns ({'is_confusing_keyword_type', 'sub_topic', 'category'}) and 4 missing columns ({'is_edge_case', 'style', 'condition', 'related'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/AbdullahImran/Mental-Health-Classification-Dataset/data/non_mental_health.csv (at revision ae431932f35a4ad4a68beb8470360b8798f82d98), ['hf://datasets/AbdullahImran/Mental-Health-Classification-Dataset@ae431932f35a4ad4a68beb8470360b8798f82d98/data/mental_health.csv', 'hf://datasets/AbdullahImran/Mental-Health-Classification-Dataset@ae431932f35a4ad4a68beb8470360b8798f82d98/data/non_mental_health.csv']
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

condition
string
style
string
title
string
content
string
is_mental_health
bool
is_edge_case
bool
related
null
eating disorder (anorexia nervosa)
doctor
Anorexia Nervosa: Understanding First-Line Treatment
Anorexia Nervosa (AN) is a serious, potentially life-threatening eating disorder characterized by significantly low body weight, an intense fear of gaining weight, and a distorted perception of body weight or shape. While the prevalence varies, it's estimated that around 0.9% to 4% of women and 0.3% of men will experie...
true
false
null
body dysmorphic disorder
doctor
Body Dysmorphic Disorder: Finding Freedom from Obsessive Concerns
Body Dysmorphic Disorder (BDD) affects approximately 1-2% of the population, causing significant distress and impairment. Many suffer in silence, believing their concerns are simply vanity. This article explores first-line treatments, offering hope for recovery. BDD is characterized by excessive preoccupation with per...
true
false
null
bipolar II disorder
doctor
Bipolar II Disorder: Understanding Effective First-Line Treatments
Bipolar II disorder affects millions, characterized by depressive episodes and hypomanic periods. It's often misdiagnosed, highlighting the need for accurate identification and effective treatment. This article will focus on widely accepted and effective first-line treatments. Bipolar II disorder is defined by recurre...
true
false
null
obsessive-compulsive disorder (contamination type)
doctor
Contamination OCD: Understanding Treatment
Obsessive-compulsive disorder (OCD) affects approximately 1-2% of the population. Contamination OCD, a common subtype, centers around fears of germs, dirt, or illness, leading to significant distress. We'll explore effective first-line treatments. Contamination OCD is characterized by intrusive, unwanted thoughts (obs...
true
false
null
eating disorder (anorexia nervosa)
patient
Chasing Empty: A Reflection
I'm Sarah, and for years, my life revolved around a number on a scale. It started subtly, a desire to be "healthier" in my early teens. Skipping dessert here, opting for a salad there. The moment it became undeniable was during a family vacation. I remember meticulously cutting my food into tiny pieces, pushing it aro...
true
false
null
atypical depression
patient
The Brightest Dark
My Background & Early Signs: I’m Sarah, and I always considered myself a generally optimistic person. But around my late twenties, I noticed a creeping fatigue. Not just tired, but *heavy*. And I started oversleeping, which was so unlike me. The Onset and Emotional Impact: It wasn't a sudden crash, but a slow fade. I ...
true
false
null
generalized anxiety disorder
doctor
GAD & Masked Symptoms: When Anxiety Hides
Generalized Anxiety Disorder (GAD) affects millions, but its presentation can be surprisingly varied. Sometimes, the anxiety isn't obvious, masked by physical symptoms or other conditions, leading to delayed diagnosis and treatment. GAD is characterized by persistent and excessive worry about various events or activit...
true
true
null
generalized anxiety disorder
patient
Anxiety's Late Bloom: Rewriting My Story
My Background & Early Signs: I was always the "chill" one. A rock for everyone else. Nearing 50, life was good - kids grown, stable job. Then, out of nowhere, it felt like the floor dropped out. The Onset and Emotional Impact: It started with a persistent unease. A low hum of worry that wouldn't quit. Dismissed it as ...
true
true
null
chronic stress
patient
The Unseen Weight
My Background & Early Signs: I'm Sarah, a 30-something software engineer. It started subtly, maybe five years ago. More frequent headaches, a little more irritable. I chalked it up to a demanding job. The Onset and Emotional Impact: The turning point was a massive project deadline. Sleepless nights became the norm, fu...
true
false
null
eating disorder (anorexia nervosa)
patient
The Scale Lied, But My Heart Didn't
My Background & Early Signs: I'm Sarah, and it started subtly. Comments about my body from family, the pressure to be 'perfect,' and a need for control spiraled. I began restricting calories, telling myself it was just a healthy diet. The Onset and Emotional Impact: The moment it became undeniable was when my period s...
true
false
null
acute stress disorder
doctor
Acute Stress Disorder: Masked Symptoms in the Elderly
Acute Stress Disorder (ASD) affects many after trauma. While estimates vary, studies suggest up to 19% of adults develop ASD after experiencing a traumatic event. This article focuses on the often-overlooked presentation of ASD in older adults, where symptoms can be masked or misattributed to other age-related conditio...
true
true
null
single event trauma (PTSD)
patient
Shattered, But Healing
I'm Sarah, and until three years ago, I lived a pretty ordinary life. Then, a car accident changed everything. The nightmares started subtly – unsettling dreams I'd brush off. But soon, they were vivid replays of screeching tires and shattering glass. The accident itself was quick, but the aftermath lingered. I couldn...
true
false
null
complex trauma (C-PTSD)
doctor
Complex Trauma (C-PTSD): Understanding First-Line Treatments
Complex trauma, or C-PTSD, affects millions, arising from prolonged or repeated traumatic experiences. Unlike single-incident PTSD, C-PTSD shapes core aspects of self and relationships. Let's explore effective first-line treatment strategies. C-PTSD arises from chronic trauma, often in childhood, involving captivity-l...
true
false
null
bipolar II disorder
doctor
Bipolar II: Unmasking Co-occurring Personality Disorders
Bipolar II disorder, characterized by depressive episodes and hypomanic periods, affects approximately 2.5% of adults. Often, its symptoms are misattributed or overshadowed, particularly when co-occurring with personality disorders, leading to delayed or inaccurate diagnoses. Clinical Overview & Diagnostic Nuances: Bi...
true
true
null
episodic acute stress
patient
Chasing Calm: My Stressful Symphony
My Background & Early Signs: I'm Sarah, a teacher. The pressure of deadlines, demanding parents, and endless grading slowly chipped away at me. I started having frequent headaches and felt constantly on edge, easily irritated. The Onset and Emotional Impact: It hit me during the winter holidays. I had planned a relaxi...
true
false
null
social anxiety disorder
doctor
Social Anxiety: When the Body Cries Out
Social anxiety disorder (SAD) affects millions, causing significant distress in social situations. While often recognized through fear of judgment, SAD can manifest in surprising ways. This article explores how, in some cases, the anxiety primarily expresses itself through physical symptoms, masking the underlying soci...
true
true
null
borderline personality disorder (emotional dysregulation focus)
doctor
BPD & Masked Depression: When Emotional Pain Hides
Borderline Personality Disorder (BPD) affects 1-3% of adults, characterized by intense emotions & unstable relationships. But what happens when BPD's hallmarks are overshadowed by another pervasive condition: depression? BPD features emotional dysregulation, impulsivity, & fear of abandonment. Diagnostic criteria incl...
true
true
null
panic disorder with agoraphobia
patient
The World Shrank, Then Grew Again
My Background & Early Signs: I'm Sarah, and for years, I considered myself a pretty typical 20-something. Looking back, though, the anxiety was always there, a low hum in the background. Little things started it - avoiding crowded malls, always needing an "out" at social gatherings. The Onset and Emotional Impact: It ...
true
false
null
postpartum depression
doctor
Postpartum Depression: Finding Your Way Back
Postpartum depression (PPD) affects up to 1 in 7 new mothers, impacting their well-being and their ability to care for their child. This isn't just "baby blues"; it's a serious condition requiring understanding and support. We'll focus on first-line treatments for this common struggle. The standard diagnostic process ...
true
false
null
atypical depression
doctor
Atypical Depression: Finding Relief from Mood Reactivity
Atypical depression, while less recognized than its "typical" counterpart, affects millions. It's marked by a unique symptom profile that demands a tailored approach to diagnosis and treatment. Unlike classic depression, it includes a capacity for mood to brighten in response to positive events, a crucial distinction f...
true
false
null
bipolar II disorder
doctor
Bipolar II: Understanding the Diagnostic Journey
Bipolar II disorder affects millions, characterized by depressive episodes and hypomania. Often, hypomania is subtle, making diagnosis challenging. Let’s explore the standard path clinicians take to identify this condition. Bipolar II is defined by experiencing at least one major depressive episode lasting two weeks o...
true
false
null
body dysmorphic disorder
doctor
Body Dysmorphic Disorder: The Mask of Physical Illness
Body dysmorphic disorder (BDD) affects approximately 1-2% of the population, causing significant distress and impairment. While often characterized by preoccupation with perceived flaws in appearance, a challenging facet emerges when BDD symptoms are masked, mimicking genuine physical ailments and delaying accurate dia...
true
true
null
complex trauma (C-PTSD)
doctor
Complex Trauma: Understanding Standard Treatment Approaches
Complex trauma, or C-PTSD, affects millions, often stemming from prolonged or repeated trauma. While PTSD typically arises from a single event, C-PTSD develops from ongoing abuse or neglect, especially during childhood. This article focuses on the most widely accepted and effective first-line treatments for C-PTSD, det...
true
false
null
atypical depression
doctor
Atypical Depression: Masked Symptoms in Older Adults
Atypical depression affects millions, yet its presentation can be deceptive, especially in older adults. Unlike classic depression, it often involves increased appetite, excessive sleep, and a sensitivity to rejection. But what happens when these symptoms are subtly masked by age-related physical changes, or misattribu...
true
true
null
borderline personality disorder (emotional dysregulation focus)
doctor
BPD: When Emotional Storms Mimic Physical Illness
Borderline Personality Disorder (BPD) affects approximately 1.6% of adults. While often recognized by intense emotional swings, a less discussed facet is how emotional dysregulation can manifest as seemingly unrelated, chronic physical complaints, delaying accurate diagnosis and appropriate care. Clinical Overview & D...
true
true
null
atypical depression
patient
Brighter Shadows
I'm Sarah, and for a long time, I just thought I was overly sensitive. Looking back, the signs were there in my late teens: needing tons of sleep, craving carbs constantly, and feeling intensely sad or hopeless whenever someone criticized me, even constructively. The real downturn hit during my junior year of college....
true
false
null
generalized anxiety disorder
doctor
Worry Less, Live More: First-Line Treatment for Generalized Anxiety
Generalized Anxiety Disorder (GAD) affects millions, causing persistent worry that disrupts daily life. But effective treatments exist. Let’s explore the standard path to relief. GAD is characterized by excessive anxiety and worry about various events or activities, occurring more days than not for at least six months...
true
false
null
obsessive-compulsive disorder (symmetry type)
patient
Off-Kilter: Symmetry's Shadow in Later Life
I'm Arthur, 72. My life felt complete, grandkids, retirement. Then, symmetry took hold. Not in my youth, but now. It started subtly. Straightening picture frames, then rearranging books by height. Annoying, sure, but manageable. I brushed it off as a quirk of aging, a need for order in a world feeling increasingly cha...
true
true
null
generalized anxiety disorder
doctor
Generalized Anxiety: Effective First-Line Treatments
Generalized Anxiety Disorder (GAD) affects millions, causing persistent worry that disrupts daily life. This article dives into the most effective first-line treatments for GAD. GAD is characterized by excessive anxiety and worry about various events or activities, occurring more days than not for at least six months....
true
false
null
panic disorder with agoraphobia
doctor
Panic, Agoraphobia, and the Mask of Physical Illness
Panic disorder with agoraphobia can feel like a life sentence, trapping individuals in cycles of fear and avoidance. While many associate it with overwhelming anxiety in public spaces, it can sometimes masquerade as something entirely different: a purely physical ailment. This article explores this challenging presenta...
true
true
null
atypical depression
doctor
Atypical Depression: Unmasking Mimicry
Atypical depression, affecting millions, often flies under the radar. While characterized by mood reactivity, increased appetite, hypersomnia, leaden paralysis, and rejection sensitivity, its chameleon-like ability to mimic physical ailments presents a unique diagnostic hurdle. Atypical depression, unlike melancholic ...
true
true
null
episodic acute stress
doctor
Episodic Acute Stress: Breaking the Cycle
Episodic acute stress is more than just a bad day; it's a pattern of frequent stress episodes. Feeling overwhelmed is common, but chronic overwhelm disrupts life. Clinical Overview & Diagnostic Nuances: Episodic acute stress involves frequent episodes of acute stress, differing from generalized anxiety or chronic str...
true
false
null
social anxiety disorder
doctor
Social Anxiety: When Symptoms Hide in Plain Sight
Social Anxiety Disorder (SAD) affects millions, yet its diverse presentations can lead to missed diagnoses. While fear of public speaking is well-known, SAD can manifest in unexpected ways, masking itself as physical ailments, impacting diagnosis and care. Clinical Overview & Diagnostic Nuances: SAD, characterized by ...
true
true
null
chronic stress
patient
The Weight of Shoulds: Chronic Stress in My 60s
My Background & Early Signs: I was always a "doer," career-focused, family-oriented. Retirement was supposed to be relaxing! But about five years ago, insomnia crept in. I brushed it off - menopause, right? Then came the persistent headaches and digestive issues. The Onset and Emotional Impact: The dam truly broke aft...
true
true
null
developmental trauma
patient
The Unseen Scars: Trauma's Late Bloom
My Background & Early Signs: I grew up in a home where feelings were…discouraged. Stoicism was prized. I never connected my anxiety and perfectionism to anything deeper until much later in life. I excelled academically, a 'good kid' masking a silent storm. The Onset and Emotional Impact: It wasn't until my late 50s, a...
true
true
null
bipolar II disorder
patient
Chasing Shadows, Finding Light
My Background & Early Signs: I'm Maria, a 62-year-old retired librarian. Looking back, the "signs" were always there: periods of intense creativity followed by crushing fatigue. But everyone just called me "quirky" or "sensitive." It wasn't until after my husband's death that things truly spiraled. The Onset and Emoti...
true
true
null
obsessive-compulsive disorder (checking type)
doctor
OCD: Checking and Taking Back Control
Obsessive-compulsive disorder (OCD) affects millions, trapping them in cycles of intrusive thoughts and repetitive behaviors. We'll focus on checking-type OCD, one of the most common presentations, and how we help patients regain control. OCD is characterized by obsessions – persistent, intrusive thoughts, urges, or i...
true
false
null
obsessive-compulsive disorder (contamination type)
patient
The Invisible Prison of Grief and Germs
I'm Sarah, and my OCD latched onto me not in adolescence, but after my husband, Mark, died suddenly five years ago. Grief became fertile ground for contamination fears. The funeral was a blur, a sea of hands offering condolences, touching me, my clothes. That's when the insidious thoughts began: *What if they're sick?...
true
true
null
single event trauma (PTSD)
patient
Echoes in the Silence: Late Trauma's Unexpected Grip
My Background & Early Signs: I was 68, happily retired, enjoying my grandkids. Life was peaceful, predictable. Then, out of nowhere, crippling anxiety, nightmares…things I hadn’t felt since I was a young woman. The Onset and Emotional Impact: It started subtly. A news report about a car accident. Then, flashbacks. Viv...
true
true
null
obsessive-compulsive disorder (contamination type)
patient
The Invisible Germ Prison
My Background & Early Signs: I'm Sarah, and my OCD started subtly. A little extra handwashing, worrying about germs, especially after using public restrooms. It seemed normal, even hygienic, at first. The Onset and Emotional Impact: Then, it escalated. It wasn't just public restrooms anymore. Everything felt potential...
true
false
null
chronic stress
patient
The Tightening Knot
My Background & Early Signs: I'm Sarah, a 30-something teacher. It started subtly. A persistent tightness in my shoulders, trouble sleeping, and a general feeling of being overwhelmed, especially during particularly demanding school terms. The Onset and Emotional Impact: It wasn't one dramatic event, but a slow creep....
true
false
null
End of preview.

Mental Health Classification Dataset

A curated English text dataset for binary mental-health text classification.

The dataset contains two classes:

  • MH — mental-health-related content
  • Non-MH — non-mental-health-related content

The dataset was prepared as part of a broader NLP project involving data cleaning, deduplication, edge-case handling, SBERT fine-tuning, and downstream binary classification.

Dataset Summary

Split / Class Examples
Mental Health (MH) 24,493
Non-Mental Health (Non-MH) 6,009
Total 30,502

The dataset is provided as two CSV files:

data/
├── mental_health.csv
└── non_mental_health.csv

Data Fields

Mental Health Dataset

The mental_health.csv file contains:

Column Description
condition Mental-health-related condition or topic
style Content style or generation/category descriptor
title Title associated with the text
content Main text content
is_mental_health Binary mental-health label
is_edge_case Indicates whether the example was identified as an edge case
related Related metadata where available

For the mental-health dataset, is_mental_health = True represents mental-health-related content.

Non-Mental Health Dataset

The non_mental_health.csv file contains:

Column Description
category General content category
sub_topic More specific topic within the category
title Title associated with the text
content Main text content
is_mental_health Binary mental-health label
is_confusing_keyword_type Indicates whether the example contains potentially confusing terminology

For the non-mental-health dataset, is_mental_health = False represents non-mental-health content.

Data Preparation

The final dataset used for this repository was produced through a preprocessing pipeline that included:

  1. Data cleaning
  2. Duplicate removal
  3. Dataset consolidation
  4. Label verification
  5. Edge-case identification
  6. Separation of mental-health and non-mental-health examples

The repository contains the final curated CSV files rather than intermediate dataset-generation versions.

Example

A mental-health example may contain text discussing a mental-health condition, symptoms, treatment, or related experiences.

A non-mental-health example may discuss topics such as technology, consumer products, entertainment, science, or other general subjects without representing mental-health content.

Intended Use

This dataset is intended for:

  • Natural language processing research
  • Binary text classification
  • Mental-health-related NLP experimentation
  • Sentence embedding research
  • Training and evaluating machine-learning classifiers
  • Educational and research projects

It can be used to investigate whether a piece of text contains mental-health-related content.

Relationship to the Model

This dataset was used as part of the broader project associated with the Fine-Tuned SBERT MiniLM for Mental Health Classification model.

The classification pipeline uses a fine-tuned SBERT encoder to generate sentence embeddings, followed by a Logistic Regression classifier for binary classification.

Text
  |
  v
Fine-Tuned SBERT
  |
  v
384-Dimensional Embedding
  |
  v
Logistic Regression
  |
  v
MH / Non-MH

Limitations

The dataset should not be interpreted as a clinical or diagnostic resource.

Mental-health language is complex and highly contextual. A text classifier trained on this dataset may produce incorrect classifications, particularly for:

  • Ambiguous statements
  • Indirect references to mental health
  • Sarcasm or figurative language
  • Unfamiliar writing styles
  • Topics outside the dataset distribution
  • Culturally or linguistically different expressions

Dataset labels represent the classification scheme used during dataset preparation and should not be interpreted as clinical judgments.

Responsible Use

This dataset should be used responsibly.

A prediction that text is classified as MH does not indicate that the author of the text has a mental-health condition. Similarly, a Non-MH prediction does not establish the absence of mental-health concerns.

The dataset and models derived from it should not be used as a substitute for professional medical or psychological assessment.

Citation

If you use this dataset in a project or publication, please cite this Hugging Face repository and the associated project.

License

No explicit open-source license is specified for this dataset at this time. Users should review the provenance and intended usage of the underlying data before redistributing or using it commercially.

Downloads last month
38