Code for the Paper "TransCORALNet: A Two-Stream Transformer CORAL Networks for Supply Chain Credit Assessment Cold Start"
The proposed TransCORALNet can be found in the model-folder under:
>>>IMPORTANT<<<
The original Code from the paper can be found in this branch:[TransCORALNet]
Also we provide the code of baseline models MMD and Deep CORAL:[MMD and DeepCORAL] CADA and DANN: [CADA and DANN]
The trained model canbe download in this branch, you can load model-TransCORALNet.pt and use it directly, also the baseline models of CADA, DANN, MMD and DeepCORAL can be download here: [Download trained models]
The current master branch has since upgraded packages and was refactored. Since the exact package-versions differ the experiments may not be 100% reproducible.
If you have problems running the code, feel free to open an issue here on Github.
In any case a requirements.txt is also added from the poetry export.
pip install -r requirements.txt
Basically, only the following requirements are needed:
numpy==1.20.3
opencv_python_headless==4.6.0.66
pandas==1.3.4
scikit_image==0.18.3
scikit_learn==1.2.0
scipy==1.7.1
torch==1.8.1
torchsummary==1.5.1
torchvision==0.9.1
lime==0.2.0.1
sdv
First, use CTGAN to generate synthetic data as target train data. Then use [dataloader] to prepare the training and testing dataset.
We offer several training/testing options as below: For batchsize (--batchsize, default 256) For training/testing epoch (--epoch, default 250) TPU allocation
example For TransCORALNet training:
python TransCORALNet\train and test.py --batchsize 256 --epoch 250 --tpu
ForTransCORALNet prediction:
python TransCORALNet/prediction.py
You can use [[Lime] to interpret the results of a model prediction. Also, the attention score calculation and visualization can be seen here: Attention score
Creating similar plots as in the paper: Using rawgraphs to create the following graph:
Using chiplot to create the following Attention score graph:
Using chiplot to create the following LIME explanation results:
The dataset are not open access due to the current data protocal. If you are interested in the dataset that we used in this paper please write an e-mail to: [email protected] and [email protected]
If you want to run this model on your own datasets, you can either
(1) reorganize your datasets: Step 1.normalized using a Min-Max normalization. Step 2. run this code with your data to fit your project.
Recall_rate F1_rate
If you decide to cite our project in your paper or use our data, please use the following bibtex reference:
@misc{shi2023transcoralnet,
title={TransCORALNet: A Two-Stream Transformer CORAL Networks for Supply Chain Credit Assessment Cold Start},
author={Jie Shi and Arno P. J. M. Siebes and Siamak Mehrkanoon},
year={2023},
eprint={2311.18749},
archivePrefix={arXiv},
primaryClass={cs.LG}
}