We implemented the code of CONAN.
The "data" folder contains the data preprocessing files {ipf,nash,ibd}_data_process.py, the training data files {ipf,nash,ibd}_train_data_{x}.py, and the testing data files _{ipf,nash,ibd}test_data.py.
{x} as {10, 100} indicates the ratio of the negative vs positive samples in the training data.
The "baseline" folder contains the codes of compared methods models.py.
The root folder contains our method files our.py and cgan.py, and original GAN codes gan.py.
models.py and our.py both contain two options. Comment the codes between "### Option x: ..." "### End build ..." before running the other option.
-
Python 3.6x
-
Keras 1.0.x
-
Numpy 1.14.x
-
Tensorflow 1.13.x
-
TensorFlow GPU 1.10.x
-
gamma=2., alpha=.25, followed "Focal loss for dense object detection"
-
MAX_SENT_LENGTH = 10, 241, 798 for IPF, NASH and IBD respectively, which are the ave. # of visits
-
MAX_SENTS = 300, 1, 1 for IPF, NASH and IBD respectively
-
EMBEDDING_DIM = 64, 128, or 256, where 128 achieves the best performance
-
epochs=10, set # of epochs through validation (no valiadation now)
-
batch_size <= 1024 to achieve the best performance
-
n_samples = 200, 20, 20 for IPF, NASH and IBD respectively
Note: This code is written in Python3.
python data/ipf_data_process.py
python models.py # Running compared methods
python our.py # Running our method