This repository implements the core idea of the BPR (Bayesian Personalized Ranking) paper by Rendle et al., using NumPy-based matrix factorization.
BPR is designed for learning personalized item rankings from implicit feedback (e.g., clicks, purchases), and optimizes pairwise ranking using stochastic gradient descent.
The input file should be a .csv file with at least two columns user_id, item_id.
A sample file (ex_data.csv) is provided in the data/ folder.
Run main.py using the following command:
python main.py --data_file ex_data \
--latent_dim 32 \
--reg 0.01 \
--learning_rate 0.01 \
--epochs 100 \
--num_samples 1000