-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
338 lines (308 loc) · 12.6 KB
/
Makefile
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
all: hyperopt train glm_bold interpret glm_attributions similarity faithfulness sanity_checks
hyperopt: results/hyperopt
train: results/models
glm_bold: results/glm/BOLD
meta: results/meta_analysis
interpret: results/attributions
glm_attributions: results/glm/attributions
similarity: results/brain_map_similarity
faithfulness: results/faithfulness
sanity_checks: results/sanity_checks
# HYPEROPT 3D-CNN model configurations
results/hyperopt: scripts/hyperopt.py scripts/identify-best-model-configuration.py
# heat-rejection
poetry run python3 scripts/hyperopt.py \
--task heat-rejection \
--data-dir data/task-heat-rejection \
--log-dir results/hyperopt/task-heat-rejection
poetry run python3 scripts/identify-best-model-configuration.py \
--task heat-rejection \
--hyperopt-dir results/hyperopt/task-heat-rejection
# WM
poetry run python3 scripts/hyperopt.py \
--task WM \
--data-dir data/task-WM \
--log-dir results/hyperopt/task-WM
poetry run python3 scripts/identify-best-model-configuration.py \
--task WM \
--hyperopt-dir results/hyperopt/task-WM
# MOTOR
poetry run python3 scripts/hyperopt.py \
--task MOTOR \
--data-dir data/task-MOTOR \
--log-dir results/hyperopt/task-MOTOR
poetry run python3 scripts/identify-best-model-configuration.py \
--task MOTOR \
--hyperopt-dir results/hyperopt/task-MOTOR
# TRAIN best-performing model configurations
results/models: scripts/train.py
# heat-rejection
poetry run python3 scripts/train.py \
--task heat-rejection \
--data-dir data/task-heat-rejection \
--num-runs 10 \
--num-folds 1 \
--model-config results/hyperopt/task-heat-rejection/best_model_config.json \
--run-group-name task-heat-rejection \
--log-dir results/models
# WM
poetry run python3 scripts/train.py \
--task WM \
--data-dir data/task-WM \
--num-runs 10 \
--num-folds 1 \
--model-config results/hyperopt/task-WM/best_model_config.json \
--run-group-name task-WM \
--log-dir results/models
# MOTOR
poetry run python3 scripts/train.py \
--task MOTOR \
--data-dir data/task-MOTOR \
--num-runs 10 \
--num-folds 1 \
--model-config results/hyperopt/task-MOTOR/best_model_config.json \
--run-group-name task-MOTOR_final-model-fits \
--log-dir results/models
# Figure
poetry run python3 scripts/fig_decoding-performance.py
# GLM for BOLD data
results/glm/BOLD: scripts/glm-BOLD_subject-level.py scripts/glm-BOLD_group-level.py
# heat-rejection
poetry run python3 scripts/glm-BOLD_subject-level.py \
--task heat-rejection \
--data-dir data/task-heat-rejection \
--subject-level-maps-dir results/glm/BOLD/task-heat-rejection/subject_level
poetry run python3 scripts/glm-BOLD_group-level.py \
--task heat-rejection \
--subject-level-maps-dir results/glm/BOLD/task-heat-rejection/subject_level \
--group-level-maps-dir results/glm/BOLD/task-heat-rejection/group_level
# WM
poetry run python3 scripts/glm-BOLD_subject-level.py \
--task WM \
--data-dir data/task-WM \
--subject-level-maps-dir results/glm/BOLD/task-WM/subject_level
poetry run python3 scripts/glm-BOLD_group-level.py \
--task WM \
--subject-level-maps-dir results/glm/BOLD/task-WM/subject_level \
--group-level-maps-dir results/glm/BOLD/task-WM/group_level
# MOTOR
poetry run python3 scripts/glm-BOLD_subject-level.py \
--task MOTOR \
--data-dir data/task-MOTOR \
--subject-level-maps-dir results/glm/BOLD/task-MOTOR/subject_level
poetry run python3 scripts/glm-BOLD_group-level.py \
--task MOTOR \
--subject-level-maps-dir results/glm/BOLD/task-MOTOR/subject_level \
--group-level-maps-dir results/glm/BOLD/task-MOTOR/group_level
# ATTRIBUTE model decoding decisions for test data
results/attributions: scripts/interpret.py
# heat-rejection
poetry run python3 scripts/interpret.py \
--task heat-rejection \
--fitted-model-dir results/models/task-heat-rejection_final-model-fits \
--data-dir data/task-heat-rejection \
--attributions-dir results/attributions/task-heat-rejection
# WM
poetry run python3 scripts/interpret.py \
--task WM \
--fitted-model-dir results/models/task-WM_final-model-fits \
--data-dir data/task-WM \
--attributions-dir results/attributions/task-WM
# MOTOR
poetry run python3 scripts/interpret.py \
--task MOTOR \
--fitted-model-dir results/models/task-MOTOR_final-model-fits \
--data-dir data/task-MOTOR \
--attributions-dir results/attributions/task-MOTOR
# GLM for attribution data
results/glm/attributions: scripts/glm-attributions_subject-level.py scripts/glm-attributions_group-level.py
# heat-rejection
poetry run python3 scripts/glm-attributions_subject-level.py \
--task heat-rejection \
--attributions-dir results/attributions/task-heat-rejection \
--subject-level-maps-dir results/glm/attributions/task-heat-rejection/subject
poetry run python3 scripts/glm-attributions_group-level.py \
--task heat-rejection \
--subject-level-maps-dir results/glm/attributions/task-heat-rejection/subject \
--group-level-maps-dir results/glm/attributions/task-heat-rejection/group
# WM
poetry run python3 scripts/glm-attributions_subject-level.py \
--task WM \
--attributions-dir results/attributions/task-WM \
--subject-level-maps-dir results/glm/attributions/task-WM/subject
poetry run python3 scripts/glm-attributions_group-level.py \
--task WM \
--subject-level-maps-dir results/glm/attributions/task-WM/subject \
--group-level-maps-dir results/glm/attributions/task-WM/group
# MOTOR
poetry run python3 scripts/glm-attributions_subject-level.py \
--task MOTOR \
--attributions-dir results/attributions/task-MOTOR \
--subject-level-maps-dir results/glm/attributions/task-MOTOR/subject
poetry run python3 scripts/glm-attributions_group-level.py \
--task MOTOR \
--subject-level-maps-dir results/glm/attributions/task-MOTOR/subject \
--group-level-maps-dir results/glm/attributions/task-MOTOR/group
# META-ANALYSIS with NeuroQuery
results/meta_analysis: scripts/meta-analysis.py
poetry run python3 scripts/meta-analysis.py \
--meta-maps-dir results/meta_analysis
# SIMILARITY of BOLD GLM maps and attribution GLM maps
results/brain_map_similarity: scripts/brain-map-similarities.py scripts/fig_brain-map-similarities.py
# heat-rejection
poetry run python3 scripts/brain_map_similarities.py \
--task heat-rejection \
--bold-glm-maps-dir results/glm/BOLD/task-heat-rejection \
--attribution-glm-maps-dir results/glm/attributions/task-heat-rejection \
--attributions-dir results/attributions/task-heat-rejection \
--meta-maps-dir results/meta_analysis/task-heat-rejection \
--brain-maps-similarity-dir results/brain_map_similarity/task-heat-rejection
# WM
poetry run python3 scripts/brain_map_similarities.py \
--task WM \
--bold-glm-maps-dir results/glm/BOLD/task-WM \
--attribution-glm-maps-dir results/glm/attributions/task-WM \
--attributions-dir results/attributions/task-WM \
--meta-maps-dir results/meta_analysis/task-WM \
--brain-maps-similarity-dir results/brain_map_similarity/task-WM
# MOTOR
poetry run python3 scripts/brain_map_similarities.py \
--task MOTOR \
--bold-glm-maps-dir results/glm/BOLD/task-MOTOR \
--attribution-glm-maps-dir results/glm/attributions/task-MOTOR \
--attributions-dir results/attributions/task-MOTOR \
--meta-maps-dir results/meta_analysis/task-MOTOR \
--brain-maps-similarity-dir results/brain_map_similarity/task-MOTOR
# Figure
poetry run python3 scripts/fig_brain-map-similarities.py \
--mfx-dir results/mfx \
--brain-maps-similarity-base-dir results/brain_map_similarity
# FAITHFULNESS of attributions
results/faithfulness: scripts/faithfulness.py scripts/fig_faithfulness.py
# heat-rejection
poetry run python3 scripts/faithfulness.py \
--task heat-rejection \
--fitted-model-dir results/models/task-heat-rejection \
--data-dir data/task-heat-rejection \
--attributions-dir results/attributions/task-heat-rejection \
--faithfulness-dir results/faithfulness/task-heat-rejection
# WM
poetry run python3 scripts/faithfulness.py \
--task WM \
--fitted-model-dir results/models/task-WM \
--data-dir data/task-WM \
--attributions-dir results/attributions/task-WM \
--faithfulness-dir results/faithfulness/task-WM
# MOTOR
poetry run python3 scripts/faithfulness.py \
--task MOTOR \
--fitted-model-dir results/models/task-MOTOR \
--data-dir data/task-MOTOR \
--attributions-dir results/attributions/task-MOTOR \
--faithfulness-dir results/faithfulness/task-MOTOR
# Figure
poetry run python3 scripts/fig_faithfulness.py \
--mfx-dir results/mfx \
--faithfulness-base-dir results/faithfulness
# SANITY_CHECKS for attributions
results/sanity_checks: scripts/sanity_checks.py scripts/fig_sanity_checks.py
# heat-rejection
# data randomization:
poetry run python3 scripts/train.py \
--task heat-rejection \
--data-dir data/task-heat-rejection \
--num-runs 1 \
--num-folds 1 \
--num-epochs 1000 \
--stopping-grace 1000 \
--model-config results/hyperopt/task-heat-rejection/best_model_config.json \
--log-dir results/models/randomized_labels \
--run-group-name task-heat-rejection_randomized-labels-fit \
--permute-labels True
poetry run python3 scripts/interpret.py
--task heat-rejection \
--fitted-model-dir results/models/randomized_labels/task-heat-rejection_randomized-labels-fit \
--data-dir data/task-heat-rejection \
--attributions-dir results/attributions/randomized_labels/task-heat-rejection
# model randomization:
poetry run python3 scripts/interpret.py
--task heat-rejection \
--fitted-model-dir results/models/task-heat-rejection \
--data-dir data/task-heat-rejection \
--attributions-dir results/attributions/randomized_model/task-heat-rejection \
--use-random-init True
# sanity checks:
poetry run python3 scripts/sanity_checks.py \
--task heat-rejection \
--data-dir data/task-heat-rejection \
--attributions-dir results/attributions/task-heat-rejection \
--randomized-labels-attributions-dir results/attributions/randomized_labels/task-heat-rejection \
--randomized-model-attributions-dir results/attributions/randomized_model/task-heat-rejection \
--sanity-checks-dir results/sanity_checks/task-heat-rejection
# WM
poetry run python3 scripts/train.py \
--task WM \
--data-dir data/task-WM \
--num-runs 1 \
--num-folds 1 \
--num-epochs 1000 \
--stopping-grace 1000 \
--model-config results/hyperopt/task-WM/best_model_config.json \
--log-dir results/models/randomized_labels \
--run-group-name task-WM_randomized-labels-fit \
--permute-labels True
poetry run python3 scripts/interpret.py
--task WM \
--fitted-model-dir results/models/randomized_labels/task-WM_randomized-labels-fit \
--data-dir data/task-WM \
--attributions-dir results/attributions/randomized_labels/task-WM
# model randomization:
poetry run python3 scripts/interpret.py
--task WM \
--fitted-model-dir results/models/task-WM \
--data-dir data/task-WM \
--attributions-dir results/attributions/randomized_model/task-WM \
--use-random-init True
# sanity checks:
poetry run python3 scripts/sanity_checks.py \
--task WM \
--data-dir data/task-WM \
--attributions-dir results/attributions/task-WM \
--randomized-labels-attributions-dir results/attributions/randomized_labels/task-WM \
--randomized-model-attributions-dir results/attributions/randomized_model/task-WM \
--sanity-checks-dir results/sanity_checks/task-WM
# MOTOR
poetry run python3 scripts/train.py \
--task MOTOR \
--data-dir data/task-MOTOR \
--num-runs 1 \
--num-folds 1 \
--num-epochs 1000 \
--stopping-grace 1000 \
--model-config results/hyperopt/task-MOTOR/best_model_config.json \
--log-dir results/models/randomized_labels \
--run-group-name task-MOTOR_randomized-labels-fit \
--permute-labels True
poetry run python3 scripts/interpret.py
--task MOTOR \
--fitted-model-dir results/models/randomized_labels/task-MOTOR_randomized-labels-fit \
--data-dir data/task-MOTOR \
--attributions-dir results/attributions/randomized_labels/task-MOTOR
# model randomization:
poetry run python3 scripts/interpret.py
--task MOTOR \
--fitted-model-dir results/models/task-MOTOR \
--data-dir data/task-MOTOR \
--attributions-dir results/attributions/randomized_model/task-MOTOR \
--use-random-init True
# sanity checks:
poetry run python3 scripts/sanity_checks.py \
--task MOTOR \
--data-dir data/task-MOTOR \
--attributions-dir results/attributions/task-MOTOR \
--randomized-labels-attributions-dir results/attributions/randomized_labels/task-MOTOR \
--randomized-model-attributions-dir results/attributions/randomized_model/task-MOTOR \
--sanity-checks-dir results/sanity_checks/task-MOTOR
# Figure
poetry run python3 scripts/fig_sanity_checks.py \
--sanity-checks-base-dir results/sanity_checks