# Amazon Polarity

Amazon Polarity is a sentiment classification dataset derived from Amazon product reviews, containing 3.6 million training and 400,000 test samples labeled positive or negative, widely used for benchmarking machine learning models.

Amazon Polarity is a large-scale sentiment classification dataset constructed from Amazon product reviews. It is commonly used as a benchmark for evaluating machine learning and deep learning models on binary text classification tasks. The dataset pairs each review with a label indicating whether the expressed sentiment is positive or negative, derived from the review's star rating.

The dataset was introduced as part of a broader effort to create standardized benchmarks for sentence classification, alongside similar datasets such as IMDB and Yelp Polarity. It was first presented in a 2015 paper by Xiang Zhang, Junbo Zhao, and Yann LeCun, which also introduced the related Amazon Full dataset. The polarity version simplifies the original five-class rating problem into two classes: reviews with ratings of 1 or 2 stars are labeled negative, while those with 4 or 5 stars are labeled positive. Reviews with a 3-star rating are excluded from the dataset.

## Construction and Statistics

The dataset is derived from a larger collection of Amazon reviews that spans over 18 years of product feedback. The original corpus contains more than 35 million reviews covering a wide range of product categories, including books, electronics, clothing, and home goods. For the polarity version, the creators sampled a subset to ensure balance between the two classes.

The final dataset contains 3,600,000 training examples and 400,000 test examples. Each example consists of the review text and a binary label. The reviews are presented as raw text without preprocessing, preserving original capitalization, punctuation, and occasional typos. This makes the dataset a realistic test for models that must handle noisy, informal language.

## Usage in Research

Amazon Polarity has become a standard benchmark in natural language processing research. It is frequently used to compare the performance of various classifiers, from traditional methods like support vector machines and logistic regression to modern [deep-learning](https://www.wikiprompt.org/wiki/deep-learning) architectures. The dataset's large size makes it particularly suitable for training [neural-network](https://www.wikiprompt.org/wiki/neural-network) models, including [transformer](https://www.wikiprompt.org/wiki/transformer)-based architectures.

Researchers often report accuracy on the test set as a primary metric. State-of-the-art models, particularly those based on [large-language-model](https://www.wikiprompt.org/wiki/large-language-model)s like BERT and its successors, achieve accuracy above 95%. The dataset is also used in studies on domain adaptation, transfer learning, and robustness to adversarial examples. Because the reviews come from diverse product categories, models trained on Amazon Polarity are expected to generalize across different domains of consumer language.

## Relationship to Other Datasets

Amazon Polarity is part of a family of datasets created by the same authors, including Amazon Full, IMDB, and Yelp Polarity. These datasets share a common format and are often used together in comparative studies. The IMDB dataset, for instance, focuses specifically on movie reviews, while Yelp Polarity draws from restaurant and business reviews. Together, they provide a range of text styles and vocabulary, allowing researchers to test model generalization across domains.

The dataset is also related to the original Amazon review corpus compiled by Julian McAuley and colleagues, which is widely used in recommendation system research. That corpus includes additional metadata such as product IDs, user IDs, and timestamps, which are not included in the polarity version.

## Limitations and Considerations

One limitation of Amazon Polarity is that it reduces a nuanced five-star rating system to a binary classification. This simplification loses information about the intensity of sentiment, as a 1-star and a 2-star review are treated identically. Additionally, the exclusion of 3-star reviews creates a gap in the middle of the sentiment spectrum, which may not reflect real-world distributions.

The dataset also inherits biases present in Amazon reviews, such as a tendency toward extreme ratings and differences in review behavior across product categories. Some researchers have noted that the dataset contains duplicate or near-duplicate reviews, which can inflate performance metrics if not handled carefully. Despite these issues, Amazon Polarity remains a widely used and reliable benchmark for sentiment analysis.

## See Also

- [machine-learning](https://www.wikiprompt.org/wiki/machine-learning)
- [artificial-intelligence](https://www.wikiprompt.org/wiki/artificial-intelligence)
- [loss-functions](https://www.wikiprompt.org/wiki/loss-functions)
- [data-augmentation](https://www.wikiprompt.org/wiki/data-augmentation)

---
Source: https://www.wikiprompt.org/wiki/amazon-polarity
License: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/)
Last updated: 2026-09-12T16:28:00.910613+00:00
