← 开源
yihong-chen

neural-collaborative-filtering

pytorch version of neural collaborative filtering

Model DevelopmentClassical MLJupyter Notebook
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
512
Star
160
Fork
+0
本周
2
贡献者
创建于 2018-03-16 · 更新于 2026-09-12 · 今日第 18054 名
主要开发者
yihong-chenRuihongQiu

yihong-chen/neural-collaborative-filtering 排名第 18,054,有 512 个星标。

同类别比较

yihong-chen/neural-collaborative-filtering 排名第 18,054,此处有 8 个同类条目;Erkaman/regl-cnn 排名第 18,056。

同类别比较
名称排名指标
WeBankFinTech/Prophecis18,039
语言:
Go
星标数:
512
分叉数:
152
简介:
Prophecis is a one-stop cloud native machine learning platform.
danielyule/hearthbreaker18,044
语言:
Python
星标数:
512
分叉数:
121
简介:
A Hearthstone: Heroes of WarCraft Simulator for the purposes of Machine Learning and Data Mining
dmlc/rabit18,045
语言:
C++
星标数:
512
分叉数:
177
简介:
Reliable Allreduce and Broadcast Interface for distributed machine learning
google-research/arco-era518,046
语言:
Python
星标数:
512
分叉数:
43
简介:
Recipes for reproducing Analysis-Ready & Cloud Optimized (ARCO) ERA5 datasets.
Erkaman/regl-cnn18,056
语言:
JavaScript
星标数:
511
分叉数:
62
简介:
Digit recognition with Convolutional Neural Networks in WebGL
Kevin-thu/DiffMorpher18,058
语言:
Python
星标数:
511
分叉数:
51
简介:
Official Code for DiffMorpher: Unleashing the Capability of Diffusion Models for Image Morphing (CVPR 2024)
cydonia999/VGGFace2-pytorch18,065
语言:
Python
星标数:
511
分叉数:
95
简介:
PyTorch Face Recognizer based on 'VGGFace2: A dataset for recognising faces across pose and age'
mindsdb/lightwood18,071
语言:
Python
星标数:
511
分叉数:
101
简介:
Lightwood is Legos for Machine Learning.
关键参数与规格
关键参数与规格
参数值
语言Jupyter Notebook
类别Model Development
子类别Classical ML
关键词Recommender system
星标数512
分叉数160
贡献者2
创建日期2018-03-16
更新日期2026-09-12
1 天星标数0
7 天星标数0
排名18,054
上次排名17,823
排名变化-231
7 天星标排名16,438
上次 7 天星标排名16,451
7 天星标排名变化13
总星标排名19,030
上次总星标排名19,002
总星标排名变化-28
README 摘录

neural-collaborative-filtering Neural collaborative filtering(NCF), is a deep learning based framework for making recommendations. The key idea is to learn the user-item interaction using neural networks. Check the follwing paper for details about NCF. " Proceedings of the 26th International Conference on World Wide Web. International World Wide Web Conferences Steering Committee, 2017. The authors of NCF actually published a nice implementation written in tensorflow(keras). This repo instead provides my implementation written in **pytorch**. I hope it

would be helpful to pytorch fans. modify the config in to change the hyper-parameters. Dataset The Movielens 1M Dataset is used to test the repo. Files : prepare train/test dataset : some handy functions for model training etc. : evaluation metrics including hit ratio(HR) and NDCG : generalized matrix factorization model : multi-layer perceptron model : fusion of gmf and mlp : training engine : entry point for train a NCF model Performance The hyper params are not tuned. Better performance can be achieved

with careful tuning, especially for the MLP model. Pretraining the user embedding & item embedding might be helpful to improve the performance of the MLP model. Experiments' results with and are shown as follows Note that the MLP model was trained from scratch but the authors suggest that the performance might be boosted by pretrain the embedding layer with GMF model. The pretrained version converges much faster. L2 regularization for GMF model Large l2 regularization might lead to the bug of

L2 regularization for MLP model a bit l2 regulzrization seems to improve the performance of the MLP model MLP with pretrained user/item embedding Pre-training the MLP model with user/item embedding from the trained GMF gives better result. MLP network size = [16, 64, 32, 16, 8] Implicit feedback without pretrain Ratings are set to 1 (interacted) or 0 (uninteracted). CPU training The code can also run on CPUs and actually pretty fast for small datasets. Requirements The repo

works under torch 1. You can find the old versions in **tags**.

常见问题

记录了多少星标和分叉?

yihong-chen/neural-collaborative-filtering 有 512 个星标和 160 个分叉。

仓库排名是多少?

yihong-chen/neural-collaborative-filtering 排名第 18,054。

记录的语言和类别是什么?

yihong-chen/neural-collaborative-filtering 有 512 个星标,语言为 Jupyter Notebook,类别为 Model Development。

哪个仓库排名最接近?

yihong-chen/neural-collaborative-filtering 与 Erkaman/regl-cnn 比较,后者排名第 18,056,有 511 个星标。

README

neural-collaborative-filtering

Neural collaborative filtering(NCF), is a deep learning based framework for making recommendations. The key idea is to learn the user-item interaction using neural networks. Check the follwing paper for details about NCF.

He, Xiangnan, et al. "Neural collaborative filtering." Proceedings of the 26th International Conference on World Wide Web. International World Wide Web Conferences Steering Committee, 2017.

The authors of NCF actually published a nice implementation written in tensorflow(keras). This repo instead provides my implementation written in pytorch. I hope it would be helpful to pytorch fans. Have fun playing with it!

Run!

python train.py

modify the config in train.py to change the hyper-parameters.

Dataset

The Movielens 1M Dataset is used to test the repo.

Files

data.py: prepare train/test dataset

utils.py: some handy functions for model training etc.

metrics.py: evaluation metrics including hit ratio(HR) and NDCG

gmf.py: generalized matrix factorization model

mlp.py: multi-layer perceptron model

neumf.py: fusion of gmf and mlp

engine.py: training engine

train.py: entry point for train a NCF model

Performance

The hyper params are not tuned. Better performance can be achieved with careful tuning, especially for the MLP model. Pretraining the user embedding & item embedding might be helpful to improve the performance of the MLP model.

Experiments' results with num_negative_samples = 4 and dim_latent_factor=8 are shown as follows

Note that the MLP model was trained from scratch but the authors suggest that the performance might be boosted by pretrain the embedding layer with GMF model.

The pretrained version converges much faster.

L2 regularization for GMF model

Large l2 regularization might lead to the bug of HR=0.0 NDCG=0.0

L2 regularization for MLP model

a bit l2 regulzrization seems to improve the performance of the MLP model

MLP with pretrained user/item embedding

Pre-training the MLP model with user/item embedding from the trained GMF gives better result.

MLP network size = [16, 64, 32, 16, 8]

Implicit feedback without pretrain

Ratings are set to 1 (interacted) or 0 (uninteracted). Train from scratch.

CPU training

The code can also run on CPUs and actually pretty fast for small datasets.

Requirements

The repo works under torch 1.0 (gpu&cpu) and torch 2.3.1(cpu, gpu yet to be tested). You can find the old versions in tags.

排名相邻
同类项目