forked from zhuyitan/IGTD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_params_def.py
150 lines (149 loc) · 3.84 KB
/
model_params_def.py
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
from improvelib.utils import str2bool
preprocess_params = [
{"name": "num_row",
"type": int,
"default": 50,
"help": "Number of pixel rows in generated image.",
},
{"name": "num_col",
"type": int,
"default": 50,
"help": "Number of pixel columns in generated image.",
},
{"name": "max_step",
"type": int,
"default": 50000, # 50000
"help": "The maximum number of iterations to run the IGTD algorithm, if it does not converge.",
},
{"name": "val_step",
"type": int,
"default": 500, # 500
"help": "The number of iterations for determining algorithm convergence. If the error reduction rate.",
},
{"name": "fea_dist_method",
"type": str,
"choice": ["Pearson", "Spearman", "set"],
"default": "Euclidean",
"help": "Method used for calculating the pairwise distances between features.",
},
{"name": "image_dist_method",
"type": str,
"choice": ["Euclidean", "Manhattan"],
"default": "Euclidean",
"help": "Method used for calculating the distances between pixels in image.",
},
{"name": "error",
"type": str,
"choice": ["abs", "squared"],
"default": "abs",
"help": "Function for evaluating the difference between feature distance ranking and pixel distance ranking.",
}
]
train_params = [
{'name': 'rlr_factor',
'type': float,
'help': 'Learning rate reduction factor'
},
{'name': 'rlr_min_delta',
'type': float,
'help': 'Learning rate reduction minimum delta'
},
{'name': 'rlr_cooldown',
'type': int,
'help': 'Learning rate reduction cooldown'
},
{'name': 'rlr_min_lr',
'type': float,
'help': 'Learning rate reduction minimum learning rate'
},
{'name': 'rlr_patience',
'type': int,
'help': 'Learning rate reduction patience'
},
{'name': 'es_min_delta',
'type': float,
'help': 'Early stop minimum delta'
},
{'name': 'dropout',
'type': float,
'default': 0.1,
'help': 'Dropout'
},
{'name': 'classification_task',
'type': str2bool,
'default': False,
'help': 'Is the task classification or not'
},
{'name': 'cnn_activation',
'type': str,
'default': "relu",
'help': 'Activation function for convolution layers'
},
{'name': 'train_task',
'type': str,
'default': "",
'help': 'Name of training task'
},
{"name": "canc_col_name",
"default": "improve_sample_id",
"type": str,
"help": "Column name that contains the cancer sample ids."
},
{"name": "drug_col_name",
"default": "improve_chem_id",
"type": str,
"help": "Column name that contains the drug ids."
},
{"name": "verbose",
"type": int,
"default": 2,
"help": "Vebosity for model."
},
{"name": "conv",
"nargs": "+",
"default": [],
"help": "conv."
},
{"name": "pool",
"nargs": "+",
"default": [],
"help": "pool."
},
{"name": "dense",
"nargs": "+",
"default": [],
"help": "dense."
},
{"name": "optimizer",
"type": str,
"default": "Adam",
"help": "optimizer."
},
{"name": "activation",
"type": str,
"default": "relu",
"help": "activation."
},
]
infer_params = [
{'name': 'classification_task',
'type': str2bool,
'default': False,
'help': 'Is the task classification or not'
},
{'name': 'inference_task',
'type': str,
'default': "",
'help': 'Name of inference task'
},
{"name": "canc_col_name",
"default": "improve_sample_id",
"type": str,
"help": "Column name that contains the cancer sample ids.",
},
{"name": "drug_col_name",
"default": "improve_chem_id",
"type": str,
"help": "Column name that contains the drug ids.",
}
]