-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Description
hi, I download the original ml-1m dataset from https://grouplens.org/datasets/movielens/, and replace the "ml-1m.txt",
fpath = '/ml-1m/ratings.dat'
def read_data(fpath):
data = []
with open(fpath, 'r') as f:
for line in f:
parts = line.strip().split('::')
if len(parts) >= 2:
uid, itemid = parts[0], parts[1]
data.append((uid, itemid))
data = pd.DataFrame(data, columns=['uid', 'itemid'])
return data
def convert_to_txt(data, output_path):
with open(output_path, 'w') as f:
for _, row in data.iterrows():
f.write(f"{row['uid']}\t{row['itemid']}\n")
data = read_data(fpath)
data.head()
output_path = 'ml-1m.txt'
convert_to_txt(data, output_path)Then run the code you provided in README.md.
python main.py --dataset=ml-1m --train_dir=default --maxlen=200 --dropout_rate=0.2 --device=cuda
I found that after just 20 epochs run, the ndcg@10 is close to 0.78.
Why is so different?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels