π Overview
This dataset contains 50,000 movie reviews from IMDB, perfectly balanced between positive and negative sentiments. Each review includes the original text, reviewer rating (1-10), sentiment label, and source URL, making it ideal for sentiment analysis, text classification, and NLP research.
β¨ Key Features
| Feature |
Description |
| π― Perfectly Balanced |
25,000 positive + 25,000 negative reviews |
| β Rating Included |
Original 1-10 reviewer ratings preserved |
| π Source URLs |
Links to 7,036 unique movies |
| π Rich Text |
Average 227 words per review |
| β
Clean Data |
Zero missing values |
π Dataset Structure
Data Fields
| Column |
Type |
Description |
review |
string |
Full text of the movie review |
movie_url |
string |
IMDB URL of the reviewed movie |
reviewer_rating |
int64 |
Rating given by reviewer (1-10 scale) |
label |
string |
Sentiment label (Positive or Negative) |
Sample Data
{
"review": "This movie was absolutely fantastic! The acting was superb...",
"movie_url": "https://www.imdb.com/title/tt0111161/",
"reviewer_rating": 9,
"label": "Positive"
}
π Statistics
Basic Information
| Metric |
Value |
| Total Reviews |
50,000 |
| Total Columns |
4 |
| Memory Usage |
74.68 MB |
| Missing Values |
0 (Clean!) |
Label Distribution
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Negative ββββββββββββββββββββββββββββββββββββ 25,000 (50%)
β Positive ββββββββββββββββββββββββββββββββββββ 25,000 (50%)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Label |
Count |
Percentage |
| Negative |
25,000 |
50.0% |
| Positive |
25,000 |
50.0% |
β Reviewer Rating Statistics
| Statistic |
Value |
| Mean |
5.50 |
| Std Dev |
3.48 |
| Min |
1 |
| Max |
10 |
| Median |
5.5 |
Rating Distribution
| Rating |
Count |
Visualization |
| 1 |
10,122 |
ββββββββββββββββββββ |
| 2 |
4,586 |
βββββββββ |
| 3 |
4,961 |
ββββββββββ |
| 4 |
5,331 |
βββββββββββ |
| 7 |
4,803 |
ββββββββββ |
| 8 |
5,859 |
ββββββββββββ |
| 9 |
4,607 |
βββββββββ |
| 10 |
9,731 |
βββββββββββββββββββ |
π Review Text Statistics
| Metric |
Characters |
Words |
| Average |
1,285 |
227 |
| Minimum |
32 |
4 |
| Maximum |
13,584 |
2,450 |
π¬ Movie Coverage
| Metric |
Value |
| Unique Movies |
7,036 |
| Avg Reviews per Movie |
7.11 |
π Usage
Loading with Hugging Face Datasets
from datasets import load_dataset
dataset = load_dataset("Omarrran/50k_IMBD_Movie_Review_by_HNM")
train_data = dataset['train']
print(train_data[0])
Loading with Pandas
import pandas as pd
from datasets import load_dataset
dataset = load_dataset("Omarrran/50k_IMBD_Movie_Review_by_HNM")
df = dataset['train'].to_pandas()
print(f"Shape: {df.shape}")
print(df.head())
Quick Sentiment Classification Example
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import classification_report
X = df['review']
y = df['label']
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.2, random_state=42, stratify=y
)
vectorizer = TfidfVectorizer(max_features=10000, stop_words='english')
X_train_vec = vectorizer.fit_transform(X_train)
X_test_vec = vectorizer.transform(X_test)
clf = LogisticRegression(max_iter=1000)
clf.fit(X_train_vec, y_train)
print(classification_report(y_test, clf.predict(X_test_vec)))
Fine-tuning Transformers
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from transformers import TrainingArguments, Trainer
model_name = "distilbert-base-uncased"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=2)
def tokenize_function(examples):
return tokenizer(examples["review"], padding="max_length", truncation=True)
tokenized_dataset = dataset.map(tokenize_function, batched=True)
training_args = TrainingArguments(
output_dir="./results",
num_train_epochs=3,
per_device_train_batch_size=16,
)
trainer = Trainer(
model=model,
args=training_args,
train_dataset=tokenized_dataset["train"],
)
trainer.train()
π― Suitable Tasks
| Task |
Description |
| π Sentiment Analysis |
Binary classification (Positive/Negative) |
| π Rating Prediction |
Predict 1-10 rating from review text |
| π Text Classification |
Multi-class or multi-label classification |
| π€ Language Modeling |
Fine-tune GPT/BERT on movie domain |
| π Feature Extraction |
Extract embeddings for downstream tasks |
| π¬ NLP Research |
Benchmark models on balanced dataset |
β οΈ Limitations
- English language only
- Movie reviews domain (may not generalize to other domains)
- User-generated content with varying quality
- Temporal bias based on collection period
- Ratings 5 and 6 are underrepresented (polarized dataset)
π Citation
If you use this dataset in your research, please cite:
@dataset{50k_IMDB_Movie_Review_by_HNM,
title = {50K IMDB Movie Reviews Dataset},
author = {Haq Nawaz Malik},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/Omarrran/50k_IMBD_Movie_Review_by_HNM}
}
π License
This dataset is provided for research and educational purposes under the MIT License.
Created by Haq Nawaz Malik
β If you find this dataset useful, please consider giving it a star!