Mahika2026 commited on
Commit
4675614
·
verified ·
1 Parent(s): eb40230

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +103 -3
README.md CHANGED
@@ -1,3 +1,103 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language: en
4
+ tags:
5
+ - text-classification
6
+ - sentiment-analysis
7
+ - imdb
8
+ - transformers
9
+ - distilbert-base-uncased
10
+ ---
11
+
12
+ # IMDb Sentiment Dataset (8k Training Samples)
13
+
14
+ This dataset is a **balanced subset** of the IMDb movie review sentiment dataset.
15
+ It is designed for **binary sentiment classification** experiments.
16
+
17
+ The dataset has been **cleaned to remove HTML tags** using BeautifulSoup and split into **training, validation, and test sets**.
18
+
19
+ ---
20
+
21
+ ## Dataset Overview
22
+
23
+ - **Source:** IMDb sentiment dataset ([stanfordnlp/imdb](https://huggingface.co/datasets/stanfordnlp/imdb))
24
+ - **Task:** Binary sentiment classification
25
+ - **Labels:**
26
+ - 0 → Negative
27
+ - 1 → Positive
28
+
29
+ ---
30
+
31
+ ## Dataset Splits
32
+
33
+ | Split | Reviews | Positive | Negative |
34
+ |------------|--------:|---------:|---------:|
35
+ | Train | 8,000 | 4,000 | 4,000 |
36
+ | Validation | 2,000 | 1,000 | 1,000 |
37
+ | Test | 2,000 | 1,000 | 1,000 |
38
+
39
+ ---
40
+
41
+ ## Preprocessing
42
+
43
+ - HTML tags removed using BeautifulSoup
44
+ - Cleaned text stored in `cleaned_text` column
45
+ - Original labels preserved in `label` column
46
+ - Data shuffled and balanced across classes
47
+
48
+ ---
49
+
50
+ ## Validation Set Creation
51
+
52
+ - The **training set (8k samples)** was sampled first, balanced across classes
53
+ - The **validation set (2k samples)** was sampled from remaining reviews, ensuring **no overlap** with training
54
+ - The **test set (2k samples)** was sampled from the remaining reviews after train & validation selection
55
+ - Each split was **shuffled** and **index reset** to avoid ordering bias
56
+
57
+ ---
58
+
59
+ ## Files in This Dataset
60
+
61
+ | File Name | Description |
62
+ |---------------------------------|------------|
63
+ | `imdb_cleaned_train_8000.csv` | Training data (8k samples, cleaned) |
64
+ | `imdb_cleaned_val_2000.csv` | Validation data (2k samples, cleaned) |
65
+ | `imdb_cleaned_test_2000.csv` | Test data (2k samples, cleaned) |
66
+ | `imdb_train_8000.csv` | Original training subset (before cleaning) |
67
+ | `imdb_val_2000.csv` | Original validation subset (before cleaning) |
68
+ | `imdb_test_2000.csv` | Original test subset (before cleaning) |
69
+
70
+ ---
71
+
72
+ ## Intended Uses
73
+
74
+ - Training sentiment analysis models (e.g., DistilBERT, BERT, or other Transformers)
75
+ - Benchmarking binary text classification tasks
76
+ - Educational NLP experiments
77
+
78
+ ---
79
+
80
+ ## Limitations
81
+
82
+ - Small subset (**8k training samples**) — may not generalize to all domains
83
+ - Only English movie reviews
84
+ - Long reviews may be truncated if tokenized for models with limited input length
85
+
86
+ ---
87
+
88
+ ## References
89
+
90
+ - Original IMDb dataset: [stanfordnlp/imdb](https://huggingface.co/datasets/stanfordnlp/imdb)
91
+ - Cleaning method: BeautifulSoup for HTML tag removal
92
+ - Example model trained on this dataset: DistilBERT IMDb Sentiment Analysis
93
+
94
+ ---
95
+
96
+ ## Environment / Framework
97
+
98
+ The dataset was prepared using the following Python libraries:
99
+
100
+ - Python: 3.10
101
+ - Pandas: 1.6.1
102
+ - BeautifulSoup: 4.12.2
103
+ - Datasets: 4.10.1