[22f4a9]: / code / reproduce_results.py

Download this file

60 lines (47 with data), 1.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from experiments.scp_experiment import SCP_Experiment
from utils import utils
# model configs
from configs.fastai_configs import *
from configs.wavelet_configs import *
def main():
datafolder = '../data/ptbxl/'
datafolder_icbeb = '../data/ICBEB/'
outputfolder = '../output/'
models = [
conf_fastai_xresnet1d101,
conf_fastai_resnet1d_wang,
conf_fastai_lstm,
conf_fastai_lstm_bidir,
conf_fastai_fcn_wang,
conf_fastai_inception1d,
conf_wavelet_standard_nn,
]
##########################################
# STANDARD SCP EXPERIMENTS ON PTBXL
##########################################
experiments = [
('exp0', 'all'),
('exp1', 'diagnostic'),
('exp1.1', 'subdiagnostic'),
('exp1.1.1', 'superdiagnostic'),
('exp2', 'form'),
('exp3', 'rhythm')
]
for name, task in experiments:
e = SCP_Experiment(name, task, datafolder, outputfolder, models)
e.prepare()
e.perform()
e.evaluate()
# generate greate summary table
utils.generate_ptbxl_summary_table()
##########################################
# EXPERIMENT BASED ICBEB DATA
##########################################
e = SCP_Experiment('exp_ICBEB', 'all', datafolder_icbeb, outputfolder, models)
e.prepare()
e.perform()
e.evaluate()
# generate greate summary table
utils.ICBEBE_table()
if __name__ == "__main__":
main()