File size: 3,957 Bytes
f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 b86d76f f52b4b7 8a51d9d f52b4b7 fdecd49 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 7fc9f2a 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 b21af2e f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d f52b4b7 8a51d9d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
---
license: gpl-3.0
language:
- en
tags:
- recommendation
- reviews
- ecommerce
- ratings
- user-behavior
pretty_name: Amazon Reviews 2023 All-Category k-Core
size_categories:
- 100M<n<1B
---
# Dataset Card for `Amazon Reviews 2023 All-Category k-Core`
* These datasets are subsets of [Amazon reviews dataset](https://amazon-reviews-2023.github.io/), collected in 2023 by [McAuley Lab](https://cseweb.ucsd.edu/~jmcauley/).
* It contains **all categories** of the reviews from the original dataset that have more than $k \in [5, 20]$ interactions.
* The original dataset contains reviews in the period of May. 1996 to Sep. 2023.
* The reviews are grouped into [25 categories](https://amazon-reviews-2023.github.io/#grouped-by-category).
* The dataset is in `.parquet` format.
> [!NOTE]
>
> **k-core** means that every user and every item has at least k interactions across **ALL categories combined**.
>
> This condition may not hold within a single category.
>
## Dataset Details
### Dataset Description
The dataset contains reviews from Amazon, and it is a subset of the original dataset. The dataset is in `.parquet` format.
Please refer to the [Dataset Creation and Processing](#dataset-creation-and-processing) section for more details about the dataset.
### Dataset Structure
The repository is structured as follows:
```
amazon-2023-all-category-k-core/
|- 5-core/
|- 5-core.parquet # 5-core ratings of all categories, 3.16GB
|- 20-core/
|- category/
|- Arts_Crafts_and_Sewing/
|- ratings.parquet # ratings of Arts, Crafts & Sewing
|- meta.parquet # meta data of items in Arts, Crafts & Sewing
|- reviews.parquet # reviews of items in Arts, Crafts & Sewing
|- ... # other categories
|- 20-core.parquet # 20-core ratings of all categories, 1.1GB
|- item_map.jsonl.gz # item map, format: [{item_index:int, parent_asin:str}], 7.97MB
|- user_map.jsonl.gz # user map, format: [{user_index:int, user_id:str}], 29.4MB
```
## Dataset Creation and Processing
1. Merge the `ratings` from all categories of [Amazon reviews 2023 dataset](https://amazon-reviews-2023.github.io/)
2. Filter out the `ratings` that have less than $k$ interactions, where $k \in [5, 20]$.
3. Filter out the `meta` data and `reviews` of items that are not in the filtered `ratings`.
4. Save the datasets in `.parquet` format.
### Core Code Snippets
```python
# Iteratively remove all users and items with fewer than k ratings
k = 20
while True:
user_counts = df['user_id'].value_counts()
item_counts = df['parent_asin'].value_counts()
filtered_df = df[
df['user_id'].isin(user_counts[user_counts >= k].index) &
df['parent_asin'].isin(item_counts[item_counts >= k].index)
]
if len(filtered_df) == len(df):
break
df = filtered_df
# `df` or `filtered_df` would be the resulted data.
```
## Dataset Sources
The original dataset is available at [Amazon reviews dataset](https://amazon-reviews-2023.github.io/).
<!-- - **Repository:** [More Information Needed] -->
<!-- - **Paper [optional]:** [More Information Needed] -->
<!-- - **Demo [optional]:** [More Information Needed] -->
## Uses
This dataset can be used for recommendation systems, sentiment analysis, and other NLP tasks.
<!-- ## Citation [optional] -->
<!-- If there is a paper or blog post introducing the dataset, the APA and Bibtex information for that should go in this section. -->
<!-- **BibTeX:** -->
<!-- [More Information Needed] -->
<!-- **APA:** -->
<!-- [More Information Needed] -->
## Glossary
The glossary of the dataset is available at [Amazon Reviews#Data Fields](https://amazon-reviews-2023.github.io/#data-fields).
## Dataset Card Authors
Chenglong Ma
## Dataset Card Contact
https://huggingface.co/ChenglongMa |