News-Recommender-Favors-Liberal

所属分类:推荐系统
开发工具:Jupyter Notebook
文件大小:0KB
下载次数:0
上传日期:2023-09-04 08:14:17
上 传 者sh-1993
说明:  提交给科学进步(审查中)的论文代码——新闻推荐人支持自由主义者:算法偏差的因果框架,
(Code for paper submitted to Science Advance (under review)---News Recommender Favors Liberals: A Causal Framework for Algorithmic Bias,)

文件列表:
code/ (0, 2023-09-04)
code/figures/ (0, 2023-09-04)
code/figures/.ipynb_checkpoints/ (0, 2023-09-04)
code/figures/.ipynb_checkpoints/1B1C_articles_num-checkpoint.ipynb (71429, 2023-09-04)
code/figures/.ipynb_checkpoints/S1_cate_subcate_distribution-checkpoint.ipynb (145012, 2023-09-04)
code/figures/1B1C_articles_num.ipynb (89994, 2023-09-04)
code/figures/2AS5A_cate_vs_lcr.ipynb (226412, 2023-09-04)
code/figures/2BS5B_news_subcate_vs_lcr.ipynb (246401, 2023-09-04)
code/figures/2CS5C_poli_nonpoli_vs_lcr.ipynb (120796, 2023-09-04)
code/figures/2DS5D_lcr_vs_lcr.ipynb (113370, 2023-09-04)
code/figures/S1_cate_subcate_distribution.ipynb (246966, 2023-09-04)
code/figures/S2_manual_vs_adfontes_allsides.ipynb (510976, 2023-09-04)
code/figures/S3_manual_distribution.ipynb (44326, 2023-09-04)
code/figures/S4_category_vs_allnews.ipynb (161160, 2023-09-04)
code/figures/figures/ (0, 2023-09-04)
code/figures/figures/cate_vs_lcr_0.1_2A.pdf (26148, 2023-09-04)
code/figures/figures/category_distribution_S1A.pdf (16427, 2023-09-04)
code/figures/figures/category_vs_allnews_S4.pdf (21025, 2023-09-04)
code/figures/figures/lcr_vs_lcr_0.1_2D.pdf (21754, 2023-09-04)
code/figures/figures/manual_adfontes_S2A.pdf (19780, 2023-09-04)
code/figures/figures/manual_allsides_S2B.pdf (18420, 2023-09-04)
code/figures/figures/manual_articles_num_1B1C.pdf (11955, 2023-09-04)
code/figures/figures/manual_distribution_S3.pdf (11126, 2023-09-04)
code/figures/figures/news_subcate_vs_lcr_0.1_2B.pdf (29331, 2023-09-04)
code/figures/figures/news_subcategory_distribution_S1B.pdf (17272, 2023-09-04)
code/figures/figures/poli_nonpoli_vs_lcr_0.1_2C.pdf (20006, 2023-09-04)
code/get_effect/ (0, 2023-09-04)
code/get_effect/get_effect.py (3379, 2023-09-04)
code/get_effect/result/ (0, 2023-09-04)
code/get_effect/result/mind/ (0, 2023-09-04)
code/get_effect/result/mind/policy_effect_o2j.pkl (7871538, 2023-09-04)
code/get_effect/result/mind/policy_effect_random_o2j1500.pkl (5583903, 2023-09-04)
code/get_effect/sam.py (3800, 2023-09-04)
code/policy_news/ (0, 2023-09-04)
code/policy_news/get_policy_news.py (1489, 2023-09-04)
code/run.sh (100, 2023-09-04)
data/ (0, 2023-09-04)
data/all_news.csv (299849, 2023-09-04)
data/i2cdf.pkl (469662, 2023-09-04)
... ...

# News-Recommender-Favors-Liberal Here are data and codes for our paper submitted to Science Advances: - News Recommender Favors Liberals: A Causal Framework for Algorithmic Bias ## Prepare the dataset 1. Download the MIND dataset from [https://msnews.github.io/](https://msnews.github.io/). 2. Unzip the files `MINDlarge_train.zip` and `MINDlarge_dev.zip`. 3. Put the folders `MINDlarge_train` and `MINDlarge_dev` into `data/mind`. 4. Run `chmod 777 prepare_data.sh` and `./prepare_data.sh` in `data/mind`. ## Run the codes 1. Run `chmod 777 run.sh` and `./run.sh` in `code` to get the effects used in the paper. For convinience, we have already prepared them in `./code/get_effect/result/mind`. 2. All the figures and results presented in our paper and SI can be reproduced by running the jupyter notebooks in `./code/figures`. You can cancel comments with `plt.savefig()` and the corresponding figures will be automatedly saved in `./code/figures/figures`. Thanks for using our code!

近期下载者

相关文件


收藏者