ourafla commited on
Commit
aca2244
·
verified ·
1 Parent(s): f320698

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +221 -1
README.md CHANGED
@@ -16,4 +16,224 @@ tags:
16
  pretty_name: Mental Health Text Classification Dataset (4-Class)
17
  size_categories:
18
  - 10K<n<100K
19
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  pretty_name: Mental Health Text Classification Dataset (4-Class)
17
  size_categories:
18
  - 10K<n<100K
19
+ ---
20
+
21
+ text
22
+ ---
23
+ pretty_name: "Mental Health Text Classification Dataset (4-Class)"
24
+ license: "cc-by-4.0"
25
+ language:
26
+ - "en"
27
+ task_categories:
28
+ - "text-classification"
29
+ tags:
30
+ - text
31
+ - nlp
32
+ - mental-health
33
+ - classification
34
+ - social-media
35
+ - reddit
36
+ - suicide-prevention
37
+ - depression
38
+ - anxiety
39
+ - tabular
40
+ size_categories:
41
+ - "10K-100K"
42
+ ---
43
+
44
+ # Mental Health Text Classification Dataset (4-Class)
45
+
46
+ ## Dataset Description
47
+
48
+ This dataset contains short, user‑generated texts labeled for **4‑class mental health classification**: **Suicidal**, **Depression**, **Anxiety**, and **Normal**.[file:64][file:65] It is a **derived dataset** created by combining and cleaning three public mental‑health corpora, then re‑labeling them into a unified 4‑class scheme and exporting CSV files suitable for both classical ML and modern NLP models.[web:24][web:72][web:54][web:58]
49
+
50
+ The repository includes:
51
+
52
+ - An **unbalanced main training corpus** (realistic class skew).
53
+ - A **strictly balanced test split** for fair evaluation.
54
+ - A **feature‑engineered file** with basic text statistics (length, URLs, emojis, punctuation, etc.).[file:91][file:92]
55
+
56
+ > **Important:** This dataset is intended for **research and education only**. It is not a clinical tool and must not be used for real‑world diagnosis, triage, or crisis intervention.[web:89]
57
+
58
+ ---
59
+
60
+ ## Dataset Structure
61
+
62
+ ### Files
63
+
64
+ 1. **`mental_heath_unbanlanced.csv`**
65
+ - Main training corpus with **48,945 samples** and a realistic, unbalanced class distribution (Normal, Depression, Suicidal, Anxiety).[file:91]
66
+ - Columns:
67
+ - `text` – Cleaned post or statement text.
68
+ - `status` – Final label in {`Suicidal`, `Depression`, `Anxiety`, `Normal`}.[file:64][file:91]
69
+
70
+ 2. **`mental_health_combined_test.csv`**
71
+ - **Balanced test split** with **992 samples** (exactly **248 per class**).[file:91]
72
+ - Columns:
73
+ - `text` – Cleaned post.
74
+ - `status` – Final 4‑class label.
75
+ - Built by combining held‑out data from the sources, applying the same cleaning and label mapping, removing duplicates, and **downsampling each class to equal size** for fair evaluation.[file:91]
76
+
77
+ 3. **`mental_health_feature_engineered.csv`**
78
+ - Cleaned and **feature‑engineered** subset for classical models and analysis.[file:92]
79
+ - Columns:
80
+ - Core: `Unique_ID`, `text`, `status` (4‑class label).
81
+ - Features:
82
+ - `text_length` – Number of characters.
83
+ - `word_count` – Number of whitespace‑separated tokens.
84
+ - `num_urls` – Count of URL patterns.
85
+ - `num_emojis` – Count of emoji characters.
86
+ - `num_special_chars` – Count of non‑alphanumeric characters.
87
+ - `num_excess_punct` – Count of repeated punctuation sequences (e.g., `!!!`, `???`, `...`).
88
+ - `avg_word_length` – Average characters per word.[file:92]
89
+
90
+ ### Splits
91
+
92
+ This repo is organized at the **file level** (no HF `train`/`test` config baked in). A common convention is:
93
+
94
+ - `mental_heath_unbanlanced.csv` → `train` (and derive your own validation split).
95
+ - `mental_health_combined_test.csv` → `test`.
96
+
97
+ Example with `datasets`:
98
+
99
+ from datasets import load_dataset
100
+
101
+ ds_train = load_dataset(
102
+ "your-username/Mental-Health_Text-Classification_Dataset",
103
+ data_files={"train": "mental_heath_unbanlanced.csv"},
104
+ )
105
+
106
+ ds_test = load_dataset(
107
+ "your-username/Mental-Health_Text-Classification_Dataset",
108
+ data_files={"test": "mental_health_combined_test.csv"},
109
+ )
110
+
111
+ print(ds_train)
112
+ print(ds_test)
113
+
114
+ text
115
+
116
+ For the feature file:
117
+
118
+ ds_fe = load_dataset(
119
+ "your-username/Mental-Health_Text-Classification_Dataset",
120
+ data_files={"feature": "mental_health_feature_engineered.csv"},
121
+ )
122
+
123
+ text
124
+
125
+ ---
126
+
127
+ ## Source Data and Provenance
128
+
129
+ This dataset does **not** collect new data from individuals. Instead, it is built by **downloading, cleaning, and merging** three existing public resources.[file:64][file:65]
130
+
131
+ **Source datasets:**
132
+
133
+ - **Suicide and Depression Detection (Kaggle)** – Nikhileswar Komati
134
+ Reddit posts from suicide‑related communities labeled as suicidal vs non‑suicidal / depression vs control.
135
+ https://www.kaggle.com/datasets/nikhileswarkomati/suicide-watch[web:24][web:70]
136
+
137
+ - **Sentiment Analysis for Mental Health (Kaggle)** – Suchintika Sarkar
138
+ Short statements labeled as normal, depression, suicide, anxiety, stress, bipolarity, personality disorder, etc.
139
+ https://www.kaggle.com/datasets/suchintikasarkar/sentiment-analysis-for-mental-health[web:69][web:72]
140
+
141
+ - **Reddit Mental Health Classification (Murarka et al.)**
142
+ Dataset released with *“Detection and Classification of Mental Illnesses on Social Media using RoBERTa.”*
143
+ Reddit posts labeled into ADHD, Anxiety, Bipolar, Depression, PTSD, and None.
144
+ https://github.com/amurark/mental-health-detection[web:54][web:58]
145
+
146
+ Only the **processed, relabeled, and re‑split** samples are redistributed here. Users must obtain the original raw data from the links above if needed.[file:64][file:65]
147
+
148
+ ---
149
+
150
+ ## Preprocessing and Label Mapping
151
+
152
+ ### Cleaning
153
+
154
+ All source datasets are passed through a common cleaning pipeline:[file:91][file:92]
155
+
156
+ - Drop rows with missing `text` or labels (`status`).
157
+ - Deduplicate texts across and within sources.
158
+ - Apply regex‑based text normalization (whitespace cleanup, formatting fixes).
159
+ - Filter out extremely short and excessively long texts to remove non‑informative samples.[file:92]
160
+
161
+ ### Unified 4‑Class Labels
162
+
163
+ Original labels vary widely (suicide vs non, multiple disorders, control). They are mapped to a **four‑class scheme**:
164
+
165
+ - **Suicidal** – Posts explicitly labeled as suicide / suicidal ideation.
166
+ - **Depression** – Posts labeled as depression / depressed.
167
+ - **Anxiety** – Posts labeled with anxiety‑related categories.
168
+ - **Normal** – Control / non‑suicide / normal posts.[web:69][file:64][file:65]
169
+
170
+ Samples whose labels cannot be clearly mapped (e.g., stress, bipolar, personality disorder, PTSD, mixed or ambiguous labels) are **discarded** to keep the final label space clean.[web:69][file:65]
171
+
172
+ ### Splits and Balance
173
+
174
+ - The **main training file** (`mental_heath_unbanlanced.csv`) preserves the **natural class imbalance** after cleaning and mapping.[file:91]
175
+ - The **balanced test file** (`mental_health_combined_test.csv`) is created by:
176
+ - Building a held‑out pool from the sources.
177
+ - Applying the same cleaning and label mapping.
178
+ - Removing duplicates.
179
+ - **Downsampling each class to 248 samples** for a total of 992 rows.[file:91]
180
+
181
+ The feature‑engineered file is generated from the cleaned sentiment subset by adding the numerical text features listed above.[file:92][web:98]
182
+
183
+ ---
184
+
185
+ ## Intended Uses
186
+
187
+ ### Primary Uses
188
+
189
+ - Research and teaching on **mental‑health‑related text classification**.
190
+ - Benchmarking binary or multi‑class classifiers (especially 4‑class).
191
+ - Studying the impact of **class imbalance**, basic feature engineering, and model robustness on noisy social‑media text.[web:93][web:100]
192
+
193
+ Typical tasks:
194
+
195
+ - 4‑way text classification: Suicidal vs Depression vs Anxiety vs Normal.
196
+ - Ablation studies: raw text vs text + simple features (from the feature‑engineered file).
197
+ - Transfer learning experiments on mental‑health Reddit data.
198
+
199
+ ### Out‑of‑Scope Uses
200
+
201
+ - Clinical decision‑making, diagnosis, or risk assessment.
202
+ - Any deployment that might influence real‑world medical, therapeutic, or crisis‑intervention workflows.
203
+ - Individual‑level profiling, surveillance, or moderation without appropriate human review and safeguards.[web:89]
204
+
205
+ ---
206
+
207
+ ## Ethical Considerations and Limitations
208
+
209
+ - **Non‑clinical labels:** Labels are derived from subreddit context and dataset creators’ heuristics, not formal diagnoses by clinicians.[web:24][web:69][web:54]
210
+ - **Domain bias:** Content is mostly from Reddit and similar platforms; models may not generalize to clinical notes, private messages, or other domains.[web:24][web:69][web:54]
211
+ - **Demographic unknowns:** There is no reliable demographic metadata; potential demographic, cultural, or linguistic biases cannot be quantified.[web:70]
212
+ - **No guarantee of harm‑free samples:** Text may contain distressing content, including mentions of self‑harm or suicide; users should handle and share it with care, especially in teaching settings.[web:24][web:69]
213
+
214
+ Users are encouraged to:
215
+
216
+ - Use this dataset **only in controlled research/educational environments**.
217
+ - Avoid building systems that auto‑label individual users in high‑stakes contexts without expert oversight.
218
+ - Follow your institution’s ethics and IRB/IEC guidelines where applicable.
219
+
220
+ ---
221
+
222
+ ## Citation
223
+
224
+ Please cite the **original datasets** and this derived dataset.
225
+
226
+ **Original datasets**
227
+
228
+ - Komati, N. *Suicide and Depression Detection* \[Dataset\]. Kaggle.
229
+ https://www.kaggle.com/datasets/nikhileswarkomati/suicide-watch[web:24]
230
+
231
+ - Sarkar, S. *Sentiment Analysis for Mental Health* \[Dataset\]. Kaggle.
232
+ https://www.kaggle.com/datasets/suchintikasarkar/sentiment-analysis-for-mental-health[web:72]
233
+
234
+ - Murarka, A., Radhakrishnan, B., & Ravichandran, S. (2021). *Detection and Classification of Mental Illnesses on Social Media using RoBERTa* \[Dataset and code\]. GitHub.
235
+ https://github.com/amurark/mental-health-detection[web:54][web:58]
236
+
237
+ **This derived dataset**
238
+
239
+ > Mukherjjee, P. (2025). *Mental Health Text Classification Dataset (4‑Class)* \[Dataset\]. Hugging Face Hub. `https://huggingface.co/datasets/your-username/Mental-Health_Text-Classification_Dataset`.[file:64]