Git Product home page Git Product logo

recbole-fairrec's Introduction

RecBole-FairRec

logo

RecBole-FairRec is a library toolkit built upon RecBole for reproducing and developing fairness-aware recommendation.

Highlights

  • Easy-to-use: Our library shares unified API and input(atomic files) as RecBole.
  • Conveniently learn and compare: Our library provides several fairess-metrics and frameworks for learning and comparing.
  • Extensive FairRec library: Recently proposed fairness-aware algorithms can be easily equipped in our library.

Requirements

python>=3.7.0
recbole>=1.0.1
numpy>=1.20.3
torch>=1.11.0
tqdm>=4.62.3

Quick-Start

With the source code, you can use the provided script for initial usage of our library:

python run_recbole.py

If you want to change the models or datasets, just run the script by setting additional command parameters:

python run_recbole.py -m [model] -d [dataset] -c [config_files]

Implement Models

We list the models that we have implemented up to now:

Datasets

The datasets used can be downloaded from Datasets Link.

Hyper-parameters

We train the models with the default parameter settings, suggested in their original paper.[link]

The Team

RecBole-FairRec is developed and maintained by members from RUCAIBox, the main developers is Jiakai Tang (@Tangjiakai).

Acknowledgement

The implementation is based on the open-source recommendation library RecBole.

Please cite the following paper as the reference if you use our code or processed datasets.

@inproceedings{zhao2021recbole,
  title={Recbole: Towards a unified, comprehensive and efficient framework for recommendation algorithms},
  author={Wayne Xin Zhao and Shanlei Mu and Yupeng Hou and Zihan Lin and Kaiyuan Li and Yushuo Chen and Yujie Lu and Hui Wang and Changxin Tian and Xingyu Pan and Yingqian Min and Zhichao Feng and Xinyan Fan and Xu Chen and Pengfei Wang and Wendi Ji and Yaliang Li and Xiaoling Wang and Ji-Rong Wen},
  booktitle={{CIKM}},
  year={2021}
}

recbole-fairrec's People

Contributors

tangjiakai avatar peteryang1031 avatar

Stargazers

 avatar  avatar  avatar Faiza Jalil avatar Code 140 avatar Ethan Bei avatar Afroditi Papadaki avatar Zhao Chuang avatar SpongeBob avatar  avatar Liu Yuanhao avatar Lei Wang avatar Weixin Chen avatar Marta Moscati avatar  avatar 妄念 avatar  avatar jbkim avatar Zeyu Zhang avatar Yupeng Hou avatar

Watchers

 avatar

recbole-fairrec's Issues

关于配置文件的问题

  1. 当我运行时:

(base) **:~/文档/recommender-code/RecBole-FairRec-master$ python run_recbole.py -m FOCF -config_files FOCF.yaml
command line args [-m FOCF -config_files FOCF.yaml] will not be used in RecBole

这是否意味着我的运行方式不对?

  1. 另外,当我尝试修改配置文件时,例如FOCF.yaml:

Data settings
LABEL_FIELD: label
threshold:
rating: 3.0
sst_attr_list: ["gender"]
item_sst_attr_list: ["genre"]
load_col:
inter: [user_id,item_id,rating]
user: [user_id,gender]
item: [item_id,genre]

开始运行后logger打印出来的读取列好像没有变化:
load_col = {'inter': ['user_id', 'item_id', 'rating'], 'user': ['user_id', 'gender'], 'item': ['item_id']}

请问正确的修改配置文件的方式应该是什么呢?

Problem running script

When running
python run_recbole.py
I receive

Traceback (most recent call last):
File "c:\Users\e12139066\Documents\Thesis\RecBole-FairRec\run_recbole.py", line 26, in
run_recbole(model=args.model, dataset=args.dataset, config_file_list=config_file_list)
File "c:\Users\e12139066\Documents\Thesis\RecBole-FairRec\recbole\quick_start\quick_start.py", line 56, in run_recbole
best_valid_score, best_valid_result = trainer.fit(
File "c:\Users\e12139066\Documents\Thesis\RecBole-FairRec\recbole\trainer\trainer.py", line 377, in fit
valid_score, valid_result = self._valid_epoch(valid_data, show_progress=show_progress)
File "c:\Users\e12139066\Documents\Thesis\RecBole-FairRec\recbole\trainer\trainer.py", line 1043, in _valid_epoch
valid_result = self.pfcn_evaluate(valid_data, load_best_model=False, show_progress=show_progress)
File "C:\Users\e12139066.conda\envs\Algos\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "c:\Users\e12139066\Documents\Thesis\RecBole-FairRec\recbole\trainer\trainer.py", line 1023, in pfcn_evaluate
self.eval_collector.eval_batch_collect(scores, interaction, positive_u, positive_i)
File "c:\Users\e12139066\Documents\Thesis\RecBole-FairRec\recbole\evaluator\collector.py", line 179, in eval_batch_collect
self.data_struct.update_tensor('rec.positive_score', scores_tensor[positive_u, positive_i])
IndexError: tensors used as indices must be long, byte or bool tensors

I have not changed the default model, data, or any settings.

Calculating NDCG@K of Different Groups

Is it possible to calculate the difference of NDCG@K between different groups given in the sensitive attribute?
IE: NDCG@K for group1(males) - NDCG@K for group2(females)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.