WWW 2023 Conference
Paper title: Improving Recommendation Fairness via Data Augmentation arxiv WWW
- PyTorch 1.7
- Python 3.5
- NVIDIA GPU + CUDA CuDNN
- Clone this repo
- Train FDA_BPR on MovieLens:
cd FDA_anonymous/fda_bpr_ml
python main.py
- Train FDA_GCCF on MovieLens:
cd FDA_anonymous/fda_gccf_ml
python main.py
- Train FDA_BPR on LastFM:
cd FDA_anonymous/fda_bpr_lastfm
python main.py
- Train FDA_GCCF on LastFM:
cd FDA_anonymous/fda_gccf_lastfm
python main.py
Note: The results of FDA will be output on the terminal after the training.
ERROR:
- The error " 'weight' must be 2-D" occurred due to inconsistent versions of the Pytorch version.
- Solution:
gender = F.embedding(u_batch,self.users_features) male_gender = gender.type(torch.BoolTensor) female_gender = (1-gender).type(torch.BoolTensor)
Replace the above code with the following code:
gender = F.embedding(u_batch,torch.unsqueeze(self.users_features,1)).reshape(-1) male_gender = gender.type(torch.BoolTensor).cuda() female_gender = (1-gender).type(torch.BoolTensor).cuda()