syedkhalid076 commited on
Commit
d113ece
·
verified ·
1 Parent(s): f29830e

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +150 -0
README.md ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - Sentiment-Analysis-Over-sampled
4
+ language:
5
+ - en
6
+ task_categories:
7
+ - text-classification
8
+ task_ids:
9
+ - sentiment-classification
10
+ size_categories:
11
+ - 100K<n<500K
12
+ tags:
13
+ - sentiment-analysis
14
+ - text-classification
15
+ - balanced-dataset
16
+ - oversampling
17
+ - csv
18
+ - pandas
19
+ pretty_name: Sentiment Analysis Dataset (OverSampled)
20
+ dataset_info:
21
+ features:
22
+ - name: text
23
+ dtype: string
24
+ - name: label
25
+ dtype: int
26
+ splits:
27
+ - name: train
28
+ num_examples: 121374
29
+ - name: validation
30
+ num_examples: 10499
31
+ - name: test
32
+ num_examples: 10499
33
+ format: csv
34
+ ---
35
+
36
+
37
+ # Sentiment Analysis Dataset
38
+
39
+ ## Overview
40
+
41
+ This dataset is designed for sentiment analysis tasks, offering a balanced and pre-processed collection of labeled text data. The dataset includes three sentiment labels:
42
+ - **0**: Negative
43
+ - **1**: Neutral
44
+ - **2**: Positive
45
+
46
+ The training dataset has been oversampled to ensure balanced label distribution, making it suitable for training robust sentiment analysis models. The validation and test datasets remain unaltered to preserve the original label distribution for unbiased evaluation.
47
+
48
+ ---
49
+
50
+ ## Dataset Details
51
+
52
+ ### Structure
53
+
54
+ | **Split** | **Rows** | **Label Distribution** |
55
+ |-----------------|----------|------------------------|
56
+ | **Train** | 121,374 | Balanced (Oversampled) |
57
+ | **Validation** | 10,499 | Original |
58
+ | **Test** | 10,499 | Original |
59
+
60
+ ### File Format
61
+
62
+ - **Type**: CSV
63
+ - **Columns**:
64
+ - `text`: The input text.
65
+ - `label`: The sentiment label (`0`, `1`, `2`).
66
+
67
+ ### Labels
68
+
69
+ | **Label** | **Sentiment** |
70
+ |-----------|---------------|
71
+ | `0` | Negative |
72
+ | `1` | Neutral |
73
+ | `2` | Positive |
74
+
75
+ ---
76
+
77
+ ## Preprocessing
78
+
79
+ The dataset has been thoroughly cleaned and pre-processed, ensuring consistency and readiness for use in machine learning tasks. Preprocessing steps include:
80
+ 1. Removal of dubplicates.
81
+ 2. Removal of Null rows.
82
+ 3. Filtering out extremely short or long entries.
83
+
84
+ ---
85
+
86
+ ## Usage
87
+
88
+ ### Loading the Dataset
89
+
90
+ The dataset can be loaded and processed using common Python libraries like `pandas`:
91
+
92
+ ```python
93
+ import pandas as pd
94
+
95
+ # Load the train dataset
96
+ train_data = pd.read_csv("path/to/train.csv")
97
+ val_data = pd.read_csv("path/to/validation.csv")
98
+ test_data = pd.read_csv("path/to/test.csv")
99
+
100
+ # Display sample data
101
+ print(train_data.head())
102
+ ```
103
+
104
+ ### Example
105
+
106
+ ```python
107
+ # Example usage: Distribution of labels in the train dataset
108
+ print(train_data['label'].value_counts())
109
+
110
+ # Example data preprocessing for modeling
111
+ from sklearn.model_selection import train_test_split
112
+ X_train, y_train = train_data['text'], train_data['label']
113
+ X_val, y_val = val_data['text'], val_data['label']
114
+ X_test, y_test = test_data['text'], test_data['label']
115
+ ```
116
+
117
+ ---
118
+
119
+ ## Applications
120
+
121
+ This dataset can be used for various sentiment analysis tasks, including:
122
+ - Building sentiment classifiers for social media analysis.
123
+ - Evaluating product or service feedback.
124
+ - Developing opinion mining systems.
125
+
126
+ ---
127
+
128
+ ## Dataset Split
129
+
130
+ | **Split** | **Purpose** |
131
+ |-----------------|------------------------------------|
132
+ | **Train** | For model training (oversampled). |
133
+ | **Validation** | For hyperparameter tuning. |
134
+ | **Test** | For final model evaluation. |
135
+
136
+ ---
137
+
138
+ ## Citation
139
+
140
+ If you use this dataset in your research or projects, please provide proper attribution:
141
+
142
+ ```plaintext
143
+ Sentiment Analysis Dataset (OverSampled)
144
+ Contributed by: Syed Khalid Hussain
145
+ ```
146
+
147
+ ---
148
+
149
+
150
+ **Author**: Syed Khalid Hussain