# BNN_CFX

This repository contains the code for the paper "Exploring Counterfactual Explanations using Bayesian Neural Networks".

## Setup
To install the required packages, run the following command:

```pipenv install```

## Running the code

To run the code, you can use the following commands:

1) Enter environment
```pipenv shell```
2) Run the code
```python3 bnn_cfx.py --args```

For example:
```python3 bnn_cfx.py --network bnn_2_150 --network_type BNN --dataset DIABETES --distance_weight 0.0 --stepsize 1e-1 --num_iterations 800```

## Reporducing results

To reproduce the results from the paper you can use the following commands:

`````./run_table_1.sh`````

```./run_table_3.sh```

These files contain the hyperparameters used for the experiments in the paper.