hongjunyan / pytorch-news-recommendation

MIT License
2 stars 0 forks source link

PyTorch implementation for news recommendation algorithms

For practice, I tried to implement the news recommendation algorithms in the recommenders with PyTorch

Implemented Algorithms

Dataset

Take it easy, do not download the dataset first, We will automatically download the dataset in train.py

Environment

Please follow the setup steps bellow:

  1. Install Anaconda
  2. Create a virtual environment by using conda command
    $> conda env create -n deepnewsrec python=3.7.13
  3. Activate the virtual environment we created
    $> conda activate deepnewsrec
  4. Install mlflow
    (deepnewsrec)$> pip install mlflow==1.29.0

How to run the code

MLFlow UI

The experiment results recorded in /mlruns. You can execute mlflow ui to see the results.

$> mlflow ui -h 127.0.0.1

then hit http://127.0.0.1:5000 img.png

Results of Formal Model

I train the bellowing models with epochs=15, batch_size=128

Algorithms \ Metrics AUC MRR NDCG@5 NDCG@10
NPA 0.6655 0.3171 0.3504 0.4143
FastFormer 0.6813 0.3287 0.3633 0.4273
NRMS 0.6822 0.3307 0.3655 0.4311

Related projects

Reference papers

TroubleShooting: