Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About dataset statistics #15

Open
yangb0o opened this issue Dec 24, 2024 · 0 comments
Open

About dataset statistics #15

yangb0o opened this issue Dec 24, 2024 · 0 comments

Comments

@yangb0o
Copy link

yangb0o commented Dec 24, 2024

Hi,

I noticed that the description mentions:

In addition, to help researchers become familiar with our data and run quick experiments, we are releasing a demo and a small version of the EB-NeRD by randomly sampling 5,000 and 50,000 users and their behavior logs from the full dataset.

But my stats on the small version show that the number of users is 18,827. The code for the statistics is as follows:

import os
import pyarrow.parquet as pq


DATA_DIR = './small'


train_df = pq.ParquetFile(os.path.join(DATA_DIR, 'train', 'behaviors.parquet')).read().to_pandas()
test_df = pq.ParquetFile(os.path.join(DATA_DIR, 'validation', 'behaviors.parquet')).read().to_pandas()
# or
# train_df = pq.ParquetFile(os.path.join(DATA_DIR, 'train', 'history.parquet')).read().to_pandas()
# test_df = pq.ParquetFile(os.path.join(DATA_DIR, 'validation', 'history.parquet')).read().to_pandas()

cnt_dict = {}
for item in train_df.to_dict(orient='records'):
  cnt_dict[item['user_id']] = 0
for item in test_df.to_dict(orient='records'):
  cnt_dict[item['user_id']] = 0

print(len(cnt_dict))
# Output: 18827

I would like to know the reason for this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant