# SACN forecasting framework **Repository Path**: andyham_andy.ham/sacn-forecasting-framework ## Basic Information - **Project Name**: SACN forecasting framework - **Description**: This project focuses on personal credit default prediction through automated higher-order feature crossover and automated feature assignment. - **Primary Language**: Python - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: https://gitee.com/andyham_andy.ham/sacn-forecasting-framework.git - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-10-22 - **Last Updated**: 2024-04-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Based SACN ## Project Introduction This project focuses on **personal credit default prediction** through automated higher-order feature crossover and automated feature assignment. Through the automated higher-order feature crossover of the **crossover network**, the model automatically learns customer feature interactions, expands the *potential breadth* of the model to learn credit data, and overcomes the limitations of manual feature engineering; through the automated feature empowerment of **self-attention**, the model automatically distinguishes the importance of the features, improves the *potential depth* of the model to learn credit data, and captures the key features of the defaulting customers. The two models are combined to realize the improvement of model prediction accuracy. The model uses the Wide&Deep structure, which is composed of **Self-Attention(SA)** and **Cross Network (CN)**. Through the combination of higher-order feature crossover and implicit crossover, the credit scoring model is able to learn the relationship between interaction features and customer default well, and finally realize the improvement of model prediction accuracy. Based on the dataset of public credit, the **SACN fusion model outperforms other mainstream personal credit default prediction models**, and can effectively improve the performance of credit default judgment with both accuracy and stability. ## Environment Setting `torch==1.10.1` `numpy==1.21.5` `pandas==1.2.4` `sklearn==1.0.2` The code was trained on **`windows10`** using **`python 3.8`** and **`cuda10.1`** ## Model For model training, run`SACN.pytorch/mian.py` `SACN.pytorch/DT_*.py` is the code for the feature engineering process using *decision tree bining*. `SACN.pytorch/Chi_*.py` is the code for the feature engineering process using *chi-square bining*. **Gvie Me Some Credit dataset** For dividing the dataset and feature engineering process please run `DT_GMSC.py` or `Chi_GMSC.py` **UCI_Credit_Card dataset** For dataset partitioning and feature engineering process please run `DT_UCI.py` or `Chi_UCI.py`. ### Dataset Selection ``` parser.add_argument('--user_train', default="data/user_train.csv") # Train dataset parser.add_argument('--user_test', default="data/user_test.csv") # Test dataset ``` ### Selection of Training Equipment ``` parser.add_argument('--train_dir', default="cuda") parser.add_argument('--device', default='cuda', type=str) # GPUtraining ``` ### Model Selection ``` parser.add_argument('--FMmode',default="CrossNet",type=str) # ['FM','AFM',"None","CrossNet","CIN"] Switching between different cross-layers ``` ## Model Comparision Containing the model files of XGboost\SVM\LR used to compare the model performance ## Reference LR/SVM/XGboost: using`sklearn`package Wide&Deep: https://doi.org/10.1145/2988450.2988454 Attention-FM: https://doi.org/10.1109/ICDMW51313.2020.00056 DCN: https://arxiv.org/pdf/1708.05123.pdf