Project Overview
Fraud detection is prevalent now more than ever due to the massive surge in the usage of online platforms. Many techniques exist to combat fraud; however, they often fail to capture the imbalanced class in data involving fraudulent activities. Our research contributes to the study of such concern with a model that harnesses the strengths of many existing models. We propose a solution that utilizes a combination of oversampling techniques and sparsity constraints to balance and predict fraud data.
Structure
Project
├── README.md
├── visualization_generation.py
├── requirements.txt
├── Baseline Models
├── GAT Baseline.py
├── GCN Baseline.py
├── GIN Baseline.py
└── Fraud Sage-ROC.py
├── GraphSmote-main
├── data
├── data_load.py
├── main.py
├── models.py
└── utils.py
└── GraphSmote-main-improved
├── data
├── data_load.py
├── main.py
├── models.py
└── utils.py
Project Usage
- Clone the repo to your local machine
- Open your terminal and cd into the directory of the cloned repo
- On the terminal, run
pip install -r requirements.txt
to obtain necessary packages to run the code. - Next, cd into the designated folder you want to run. And then run
python (name of the py file).py
. Explained more in detail below.
- torch
- Numpy==1.21.5
- Pytorch==1.10.1
- DGL==0.8.2
- pygod == 1.1.0
- sklearn
- functools
run designated model
Ex: python GAT Baseline.py
python main.py --imbalance --dataset=amazon --setting='recon'
Note: In checkpoint file, change "recon_300_False_0.5.pth" to "Pretrained.pth.pth", then run finetune
python main.py --imbalance --dataset=amazon --setting='newG_cls' --load=Pretrained.pth
python main.py --imbalance --dataset=amazon --setting='recon'
Note: In checkpoint file, change recon_300_False_0.5.pth to Pretrained.pth.pth, then run finetune
python main.py --imbalance --dataset=amazon --setting='newG_cls' --load=Pretrained.pth
python visualization_generation.py