yihong-chen / neural-collaborative-filtering

pytorch version of neural collaborative filtering

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NeuMF algorithm

nailon opened this issue · comments

Dear Yihong Chen,

I am very interested in this project. Thank you for sharing it.

I tried running the NeuMF algorithm using the default config that you provide in your code (see below), but I am getting bad results.

Do I need to change the parameters?
Do you maybe have a model that you already trained, and you could share with me?

Thanks,
Nir Ailon

neumf_config = {'alias': 'pretrain_neumf_factor8neg4',
'num_epoch': 200,
'batch_size': 1024,
'optimizer': 'adam',
'adam_lr': 1e-3,
'num_users': 6040,
'num_items': 3706,
'latent_dim_mf': 8,
'latent_dim_mlp': 8,
'num_negative': 4,
'layers': [16,32,16,8], # layers[0] is the concat of latent user vector & latent item vector
'l2_regularization': 0.01,
'use_cuda': True,
'device_id': 7,
'pretrain': True,
'pretrain_mf': 'checkpoints/{}'.format('gmf_factor8neg4_Epoch100_HR0.6391_NDCG0.2852.model'),
'pretrain_mlp': 'checkpoints/{}'.format('mlp_factor8neg4_Epoch100_HR0.5606_NDCG0.2463.model'),
'model_dir':'checkpoints/{}_Epoch{}_HR{:.4f}_NDCG{:.4f}.model'
}

Sorry for the late reply. Unfortunately, I don't have any stored models currently. I would suggest you to increase the latent dimension and num_negative. Also, NeuMF requires pretraining of GMF and MLP. Without pretraining, it is very hard to train it from scratch. So do check the performance of the pretrained model. I hope this helps.