Skip to content

hanxiao0607/CFAD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ba0c8fd ยท Apr 1, 2025

History

32 Commits
Jul 13, 2022
Mar 3, 2023
Aug 15, 2022
Nov 10, 2021
Nov 10, 2021
Mar 3, 2023
Aug 13, 2022
Aug 13, 2022
Aug 13, 2022
Oct 25, 2021
Apr 1, 2025
Aug 22, 2023

Repository files navigation

License Python 3.9

CFAD: Achieving Counterfactual Fairness for Anomaly Detection

A Pytorch implementation of CFAD.

๐Ÿงฐ Configuration

  • Ubuntu 20.04
  • NVIDIA driver 470.74
  • CUDA 11.1
  • Python 3.9.7
  • PyTorch 1.9.1

๐Ÿ–ฅ๏ธ Hardware

  • Intel(R) Core(TM) i9-10900X CPU @ 3.70GHz
  • 64 GB Memory
  • NVIDIA GeForce RTX 2080 Ti

โš™๏ธ Installation

This code requires the packages listed in requirements.txt. A virtual environment is recommended to run this code

On macOS and Linux:

python3 -m pip install --user virtualenv
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
deactivate

Reference: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/

๐Ÿš€ Instructions

Clone the template project, replacing my-project with the name of the project you are creating:

    git clone https://github.com/hanxiao0607/CFAD.git my-project
    cd my-project

Run and test:

    python3 CFAD_adult.py
    or
    python3 CFAD_compas.py
    or
    python3 CFAD_synthetic.py

๐Ÿ“„ Citation

@inproceedings{han2023achieving,
  title={Achieving Counterfactual Fairness for Anomaly Detection},
  author={Han, Xiao and Zhang, Lu and Wu, Yongkai and Yuan, Shuhan},
  booktitle={Pacific-Asia Conference on Knowledge Discovery and Data Mining},
  pages={55--66},
  year={2023},
  organization={Springer}
}