-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.nn_20_8_0.01_feature2
220 lines (192 loc) · 10.4 KB
/
Makefile.nn_20_8_0.01_feature2
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
include Makefile.feature.feature2
N = 20
HIDDEN = 8
LRATE = 0.01
ALGO_NAME := nn_$(N)_$(HIDDEN)_$(LRATE)
MODEL_NAME := $(ALGO_NAME)_$(FEATURE_NAME)
METRIC_VAL := $(DIR_METRIC)/$(MODEL_NAME).val.txt
PREDICT_VAL := $(DIR_VAL)/$(MODEL_NAME).val.csv
PREDICT_TST := $(DIR_TST)/$(MODEL_NAME).tst.csv
PREDICT_VAL00 := $(DIR_VAL)/$(MODEL_NAME).val00.csv
PREDICT_TST00 := $(DIR_TST)/$(MODEL_NAME).tst00.csv
PREDICT_VAL01 := $(DIR_VAL)/$(MODEL_NAME).val01.csv
PREDICT_TST01 := $(DIR_TST)/$(MODEL_NAME).tst01.csv
PREDICT_VAL02 := $(DIR_VAL)/$(MODEL_NAME).val02.csv
PREDICT_TST02 := $(DIR_TST)/$(MODEL_NAME).tst02.csv
PREDICT_VAL03 := $(DIR_VAL)/$(MODEL_NAME).val03.csv
PREDICT_TST03 := $(DIR_TST)/$(MODEL_NAME).tst03.csv
PREDICT_VAL04 := $(DIR_VAL)/$(MODEL_NAME).val04.csv
PREDICT_TST04 := $(DIR_TST)/$(MODEL_NAME).tst04.csv
PREDICT_VAL05 := $(DIR_VAL)/$(MODEL_NAME).val05.csv
PREDICT_TST05 := $(DIR_TST)/$(MODEL_NAME).tst05.csv
PREDICT_VAL06 := $(DIR_VAL)/$(MODEL_NAME).val06.csv
PREDICT_TST06 := $(DIR_TST)/$(MODEL_NAME).tst06.csv
PREDICT_VAL07 := $(DIR_VAL)/$(MODEL_NAME).val07.csv
PREDICT_TST07 := $(DIR_TST)/$(MODEL_NAME).tst07.csv
PREDICT_VAL08 := $(DIR_VAL)/$(MODEL_NAME).val08.csv
PREDICT_TST08 := $(DIR_TST)/$(MODEL_NAME).tst08.csv
PREDICT_VAL09 := $(DIR_VAL)/$(MODEL_NAME).val09.csv
PREDICT_TST09 := $(DIR_TST)/$(MODEL_NAME).tst09.csv
PREDICT_VAL10 := $(DIR_VAL)/$(MODEL_NAME).val10.csv
PREDICT_TST10 := $(DIR_TST)/$(MODEL_NAME).tst10.csv
PREDICT_VAL11 := $(DIR_VAL)/$(MODEL_NAME).val11.csv
PREDICT_TST11 := $(DIR_TST)/$(MODEL_NAME).tst11.csv
PREDICT_VAL12 := $(DIR_VAL)/$(MODEL_NAME).val12.csv
PREDICT_TST12 := $(DIR_TST)/$(MODEL_NAME).tst12.csv
PREDICT_VAL13 := $(DIR_VAL)/$(MODEL_NAME).val13.csv
PREDICT_TST13 := $(DIR_TST)/$(MODEL_NAME).tst13.csv
SUBMISSION_TST := $(DIR_TST)/$(MODEL_NAME).sub.csv
all: validation submission
validation: $(METRIC_VAL)
submission: $(SUBMISSION_TST)
retrain: clean_$(ALGO_NAME) submission
$(PREDICT_TST00) $(PREDICT_VAL00): $(FEATURE_TRN00) $(FEATURE_TST00) \
| $(DIR_VAL) $(DIR_TST)
./src/train_predict_nn.py --train-file $< \
--test-file $(word 2, $^) \
--predict-valid-file $(PREDICT_VAL00) \
--predict-test-file $(PREDICT_TST00) \
--hidden $(HIDDEN) \
--lrate $(LRATE) \
--n-iter $(N)
$(PREDICT_TST01) $(PREDICT_VAL01): $(FEATURE_TRN01) $(FEATURE_TST01) \
| $(DIR_VAL) $(DIR_TST)
./src/train_predict_nn.py --train-file $< \
--test-file $(word 2, $^) \
--predict-valid-file $(PREDICT_VAL01) \
--predict-test-file $(PREDICT_TST01) \
--hidden $(HIDDEN) \
--lrate $(LRATE) \
--n-iter $(N)
$(PREDICT_TST02) $(PREDICT_VAL02): $(FEATURE_TRN02) $(FEATURE_TST02) \
| $(DIR_VAL) $(DIR_TST)
./src/train_predict_nn.py --train-file $< \
--test-file $(word 2, $^) \
--predict-valid-file $(PREDICT_VAL02) \
--predict-test-file $(PREDICT_TST02) \
--hidden $(HIDDEN) \
--lrate $(LRATE) \
--n-iter $(N)
$(PREDICT_TST03) $(PREDICT_VAL03): $(FEATURE_TRN03) $(FEATURE_TST03) \
| $(DIR_VAL) $(DIR_TST)
./src/train_predict_nn.py --train-file $< \
--test-file $(word 2, $^) \
--predict-valid-file $(PREDICT_VAL03) \
--predict-test-file $(PREDICT_TST03) \
--hidden $(HIDDEN) \
--lrate $(LRATE) \
--n-iter $(N)
$(PREDICT_TST04) $(PREDICT_VAL04): $(FEATURE_TRN04) $(FEATURE_TST04) \
| $(DIR_VAL) $(DIR_TST)
./src/train_predict_nn.py --train-file $< \
--test-file $(word 2, $^) \
--predict-valid-file $(PREDICT_VAL04) \
--predict-test-file $(PREDICT_TST04) \
--hidden $(HIDDEN) \
--lrate $(LRATE) \
--n-iter $(N)
$(PREDICT_TST05) $(PREDICT_VAL05): $(FEATURE_TRN05) $(FEATURE_TST05) \
| $(DIR_VAL) $(DIR_TST)
./src/train_predict_nn.py --train-file $< \
--test-file $(word 2, $^) \
--predict-valid-file $(PREDICT_VAL05) \
--predict-test-file $(PREDICT_TST05) \
--hidden $(HIDDEN) \
--lrate $(LRATE) \
--n-iter $(N)
$(PREDICT_TST06) $(PREDICT_VAL06): $(FEATURE_TRN06) $(FEATURE_TST06) \
| $(DIR_VAL) $(DIR_TST)
./src/train_predict_nn.py --train-file $< \
--test-file $(word 2, $^) \
--predict-valid-file $(PREDICT_VAL06) \
--predict-test-file $(PREDICT_TST06) \
--hidden $(HIDDEN) \
--lrate $(LRATE) \
--n-iter $(N)
$(PREDICT_TST07) $(PREDICT_VAL07): $(FEATURE_TRN07) $(FEATURE_TST07) \
| $(DIR_VAL) $(DIR_TST)
./src/train_predict_nn.py --train-file $< \
--test-file $(word 2, $^) \
--predict-valid-file $(PREDICT_VAL07) \
--predict-test-file $(PREDICT_TST07) \
--hidden $(HIDDEN) \
--lrate $(LRATE) \
--n-iter $(N)
$(PREDICT_TST08) $(PREDICT_VAL08): $(FEATURE_TRN08) $(FEATURE_TST08) \
| $(DIR_VAL) $(DIR_TST)
./src/train_predict_nn.py --train-file $< \
--test-file $(word 2, $^) \
--predict-valid-file $(PREDICT_VAL08) \
--predict-test-file $(PREDICT_TST08) \
--hidden $(HIDDEN) \
--lrate $(LRATE) \
--n-iter $(N)
$(PREDICT_TST09) $(PREDICT_VAL09): $(FEATURE_TRN09) $(FEATURE_TST09) \
| $(DIR_VAL) $(DIR_TST)
./src/train_predict_nn.py --train-file $< \
--test-file $(word 2, $^) \
--predict-valid-file $(PREDICT_VAL09) \
--predict-test-file $(PREDICT_TST09) \
--hidden $(HIDDEN) \
--lrate $(LRATE) \
--n-iter $(N)
$(PREDICT_TST10) $(PREDICT_VAL10): $(FEATURE_TRN10) $(FEATURE_TST10) \
| $(DIR_VAL) $(DIR_TST)
./src/train_predict_nn.py --train-file $< \
--test-file $(word 2, $^) \
--predict-valid-file $(PREDICT_VAL10) \
--predict-test-file $(PREDICT_TST10) \
--hidden $(HIDDEN) \
--lrate $(LRATE) \
--n-iter $(N)
$(PREDICT_TST11) $(PREDICT_VAL11): $(FEATURE_TRN11) $(FEATURE_TST11) \
| $(DIR_VAL) $(DIR_TST)
./src/train_predict_nn.py --train-file $< \
--test-file $(word 2, $^) \
--predict-valid-file $(PREDICT_VAL11) \
--predict-test-file $(PREDICT_TST11) \
--hidden $(HIDDEN) \
--lrate $(LRATE) \
--n-iter $(N)
$(PREDICT_TST12) $(PREDICT_VAL12): $(FEATURE_TRN12) $(FEATURE_TST12) \
| $(DIR_VAL) $(DIR_TST)
./src/train_predict_nn.py --train-file $< \
--test-file $(word 2, $^) \
--predict-valid-file $(PREDICT_VAL12) \
--predict-test-file $(PREDICT_TST12) \
--hidden $(HIDDEN) \
--lrate $(LRATE) \
--n-iter $(N)
$(PREDICT_TST13) $(PREDICT_VAL13): $(FEATURE_TRN13) $(FEATURE_TST13) \
| $(DIR_VAL) $(DIR_TST)
./src/train_predict_nn.py --train-file $< \
--test-file $(word 2, $^) \
--predict-valid-file $(PREDICT_VAL13) \
--predict-test-file $(PREDICT_TST13) \
--hidden $(HIDDEN) \
--lrate $(LRATE) \
--n-iter $(N)
$(SUBMISSION_TST): $(PREDICT_TST) $(HEADER) $(ID_TST) | $(DIR_TST)
paste -d, $(lastword $^) $< > [email protected]
cat $(word 2, $^) [email protected] > $@
$(PREDICT_VAL): $(PREDICT_VAL00) $(PREDICT_VAL01) $(PREDICT_VAL02) \
$(PREDICT_VAL03) $(PREDICT_VAL04) $(PREDICT_VAL05) \
$(PREDICT_VAL06) $(PREDICT_VAL07) $(PREDICT_VAL08) \
$(PREDICT_VAL09) $(PREDICT_VAL10) $(PREDICT_VAL11) \
$(PREDICT_VAL12) $(PREDICT_VAL13)
paste -d, $^ > $@
$(PREDICT_TST): $(PREDICT_TST00) $(PREDICT_TST01) $(PREDICT_TST02) \
$(PREDICT_TST03) $(PREDICT_TST04) $(PREDICT_TST05) \
$(PREDICT_TST06) $(PREDICT_TST07) $(PREDICT_TST08) \
$(PREDICT_TST09) $(PREDICT_TST10) $(PREDICT_TST11) \
$(PREDICT_TST12) $(PREDICT_TST13)
paste -d, $^ > $@
$(METRIC_VAL): $(PREDICT_VAL) $(YS_TRN) | $(DIR_METRIC)
./src/evaluate.py -t $(lastword $^) -p $< > $@
cat $@
clean:: clean_$(ALGO_NAME)
clean_$(ALGO_NAME):
-rm $(METRIC_VAL) $(PREDICT_VAL) $(PREDICT_TST) $(SUBMISSION_TST)
find . -name '*.pyc' -delete
.DEFAULT_GOAL := all