# DECAF: Dynamic Entropy-guided Credit Assessment Framework This repository contains the implementation of DECAF, a deep learning framework for credit assessment that combines Capsule Networks (CapsNet) and Soft Actor-Critic (SAC) algorithms. ## Environment Requirements ```python python==3.9 torch==2.1.0 numpy==1.21.0 pandas==1.4.0 scikit-learn==1.0.2 xgboost==1.5.0 matplotlib==3.5.0 ``` ## Project Structure ``` ├── data/ │ └── car_insurance.csv # Car Insurance Dataset ├── models/ │ ├── capsnet.py # CapsNet implementation │ └── sac.py # SAC implementation ├── utils/ │ ├── data_utils.py # Data preprocessing utilities │ └── eval_utils.py # Evaluation metrics ├── train.py # Main training script └── evaluate.py # Evaluation script ``` ## Data Preprocessing The Car Insurance Dataset is used in this project. You can download it from [Kaggle](https://www.kaggle.com/datasets/sagnik1511/car-insurance-data). Main preprocessing steps include: 1. Numerical feature normalization 2. Categorical feature encoding 3. Train/validation/test split 4. Class imbalance handling using SMOTE ## Model Training To train the DECAF model: ```bash python train.py --data_path data/car_insurance.csv --epochs 50 --batch_size 256 ``` Key hyperparameters are configured in `train.py`: - Learning rate: 1e-4 - CapsNet layers: 3 - SAC target entropy: -2 - Replay buffer size: 5e5 ## Evaluation To evaluate the trained model: ```bash python evaluate.py --model_path checkpoints/best_model.pth --test_data data/car_insurance.csv ``` The evaluation script will output: - ROC curves - AUC scores - Accuracy metrics - Loss curves ## References If you use this code, please cite our paper: ``` @article{decaf2024, title={DECAF: Dynamic Entropy-guided Credit Assessment Framework}, year={2024} } ```