Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
csv
Sub-tasks:
sentiment-classification
Languages:
English
Size:
100K - 1M
Syed Khalid Hussain commited on
Create README.md
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150---datasets: - Sentiment-Analysis-Over-sampledlanguage: - entask_categories: - text-classificationtask_ids: - sentiment-classificationsize_categories: - 100K<n<500Ktags: - sentiment-analysis - text-classification - balanced-dataset - oversampling - csv - pandaspretty_name: Sentiment Analysis Dataset (OverSampled)dataset_info: features: - name: text dtype: string - name: label dtype: int splits: - name: train num_examples: 121374 - name: validation num_examples: 10499 - name: test num_examples: 10499 format: csv---
# Sentiment Analysis Dataset
## Overview
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: - **0**: Negative - **1**: Neutral - **2**: Positive
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.
---
## Dataset Details
### Structure
| **Split** | **Rows** | **Label Distribution** ||-----------------|----------|------------------------|| **Train** | 121,374 | Balanced (Oversampled) || **Validation** | 10,499 | Original || **Test** | 10,499 | Original |
### File Format
- **Type**: CSV - **Columns**: - `text`: The input text. - `label`: The sentiment label (`0`, `1`, `2`).
### Labels
| **Label** | **Sentiment** ||-----------|---------------|| `0` | Negative || `1` | Neutral || `2` | Positive |
---
## Preprocessing
The dataset has been thoroughly cleaned and pre-processed, ensuring consistency and readiness for use in machine learning tasks. Preprocessing steps include: 1. Removal of dubplicates. 2. Removal of Null rows.3. Filtering out extremely short or long entries.
---
## Usage
### Loading the Dataset
The dataset can be loaded and processed using common Python libraries like `pandas`:
```pythonimport pandas as pd
# Load the train datasettrain_data = pd.read_csv("path/to/train.csv")val_data = pd.read_csv("path/to/validation.csv")test_data = pd.read_csv("path/to/test.csv")
# Display sample dataprint(train_data.head())```
### Example
```python# Example usage: Distribution of labels in the train datasetprint(train_data['label'].value_counts())
# Example data preprocessing for modelingfrom sklearn.model_selection import train_test_splitX_train, y_train = train_data['text'], train_data['label']X_val, y_val = val_data['text'], val_data['label']X_test, y_test = test_data['text'], test_data['label']```
---
## Applications
This dataset can be used for various sentiment analysis tasks, including: - Building sentiment classifiers for social media analysis. - Evaluating product or service feedback. - Developing opinion mining systems.
---
## Dataset Split
| **Split** | **Purpose** ||-----------------|------------------------------------|| **Train** | For model training (oversampled). || **Validation** | For hyperparameter tuning. || **Test** | For final model evaluation. |
---
## Citation
If you use this dataset in your research or projects, please provide proper attribution:
```plaintext Sentiment Analysis Dataset (OverSampled) Contributed by: Syed Khalid Hussain ```
---
**Author**: Syed Khalid Hussain README.mdAdded+150