Skip to content
/ FDA Public

Improving Recommendation Fairness via Data Augmentation-WWW23

Notifications You must be signed in to change notification settings

newlei/FDA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FDA

WWW 2023 Conference

Paper title: Improving Recommendation Fairness via Data Augmentation arxiv WWW

Prerequisites

  • PyTorch 1.7
  • Python 3.5
  • NVIDIA GPU + CUDA CuDNN

Getting Started

Installation

  • Clone this repo

Train/test

  • 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:

  1. 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()        

About

Improving Recommendation Fairness via Data Augmentation-WWW23

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages