"UP-AR-recourse" contains the entire code necessary to replicate the results in the paper. For ease of access, please use google colab to run the discussed ipynb files and upload the files into google drive. Before running the ipynb files, please update all the file paths accordingly.

The main directory, "UP-AR-recourse" consists of all the ipynb files necessary to reproduce the results from the paper and the necessary directories:

1. The "data" folder contains the processed version of german credit data. This dataset is obtained from the AR repository on GitHub and is used to replicate the experiments from AR on the linear model.

2. The files: compas_runs.ipynb, adult_income_runs.ipynb, credit_runs.ipynb, heloc_runs.ipynb are used to train models and generate the counterfactuals for the respective datasets. 

3. user-preferred-recourse-linear.ipynb is used to analyze the performance of UP-AR on the processed german data with a linear model and contains the complete code for linear models only. This file is specifically used to reproduce the AR results and for ablation studies for UP-AR. A similar file user-preferred-recourse-non-linear.ipynb is also used to perform performance analysis on the GMSC dataset.

4. UP-AR is built upon the popular CARLA library and the corresponding code is added in this directory: UP-AR-recourse -> CARLA-new_eval -> carla -> recourse_methods -> catalog -> user_preferred. The code here can be used for both linear and non-linear models.

5. The overall analysis for the traditional metrics is consolidated in the results_and_analysis.ipynb file.

6. The "results" folder within "UP-AR-recourse" contains the counterfactuals generated for multiple datasets using the methods discussed in the paper.

7. The "plots" folder consists of all the plots used in the paper and can be generated from the interactive python notebooks in the main "UP-AR-recourse" folder.
