Giter Site home page Giter Site logo

transcoralnet's Introduction

TransCORALNet

Architecture

Code for the Paper "TransCORALNet: A Two-Stream Transformer CORAL Networks for Supply Chain Credit Assessment Cold Start"

[TransCORALNet]

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.


Installing dependencies

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

Usages

Generate synthetic data

First, use CTGAN to generate synthetic data as target train data. Then use [dataloader] to prepare the training and testing dataset.

Training

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

Explanation

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

Plot

Creating similar plots as in the paper: Using rawgraphs to create the following graph:

Attention score

Using chiplot to create the following Attention score graph:

positive negative difference

Using chiplot to create the following LIME explanation results:

defaulting non-defauling

Dataset

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.


Results

Model performance

Recall_rate

F1_rate

Citation

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}
}    

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.