-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathscript.sh
213 lines (174 loc) · 13.2 KB
/
script.sh
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
#generate raw files
echo "generating raw files"
python cPickleparser.py
python features_sampled.py
#genertate features
echo "generating bahsic features"
python features_bahsic.py "data/features_raw.dat" "data/labels_0.dat" "data/features_bahsic_0.dat" "data/features_normalized.dat"
python features_bahsic.py "data/features_raw.dat" "data/labels_1.dat" "data/features_bahsic_1.dat"
python features_bahsic.py "data/features_raw.dat" "data/labels_2.dat" "data/features_bahsic_2.dat"
python features_bahsic.py "data/features_raw.dat" "data/labels_3.dat" "data/features_bahsic_3.dat"
echo "generating rrt features"
echo "Run the matlab file to generate Recht and Rahimi Random Fourier features"
echo "generating downsampled features"
python features_sampled.py "data/features_sampled.dat"
# do a train-test split
python split_data.py "data/features_raw.dat" "data/labels_0.dat" "data/labels_test_0.dat"
python split_data.py "data/features_raw.dat" "data/labels_1.dat" "data/labels_test_1.dat"
python split_data.py "data/features_raw.dat" "data/labels_2.dat" "data/labels_test_2.dat"
python split_data.py "data/features_raw.dat" "data/labels_3.dat" "data/labels_test_3.dat"
#BAHSIC
echo "regression bahsic linear"
python regression_linear.py "data/features_bahsic_0.dat" "data/labels_0.dat" "predict/hsic_linear_0.dat 42"
python regression_linear.py "data/features_bahsic_1.dat" "data/labels_1.dat" "predict/hsic_linear_1.dat 42"
python regression_linear.py "data/features_bahsic_2.dat" "data/labels_2.dat" "predict/hsic_linear_2.dat 42"
python regression_linear.py "data/features_bahsic_3.dat" "data/labels_3.dat" "predict/hsic_linear_3.dat 42"
echo "regression bahsic bayesian"
python regression_bayesian.py "data/features_bahsic_0.dat" "data/labels_0.dat" "predict/hsic_bayesian_0.dat 42"
python regression_bayesian.py "data/features_bahsic_1.dat" "data/labels_1.dat" "predict/hsic_bayesian_1.dat 42"
python regression_bayesian.py "data/features_bahsic_2.dat" "data/labels_2.dat" "predict/hsic_bayesian_2.dat 42"
python regression_bayesian.py "data/features_bahsic_3.dat" "data/labels_3.dat" "predict/hsic_bayesian_3.dat 42"
echo "regression bahsic dtree"
python regression_dtree.py "data/features_bahsic_0.dat" "data/labels_0.dat" "predict/hsic_dtree_0.dat 42"
python regression_dtree.py "data/features_bahsic_1.dat" "data/labels_1.dat" "predict/hsic_dtree_1.dat 42"
python regression_dtree.py "data/features_bahsic_2.dat" "data/labels_2.dat" "predict/hsic_dtree_2.dat 42"
python regression_dtree.py "data/features_bahsic_3.dat" "data/labels_3.dat" "predict/hsic_dtree_3.dat 42"
echo "regression bahsic svr"
python regression_svr.py "data/features_bahsic_0.dat" "data/labels_0.dat" "predict/hsic_svr_0.dat 42"
python regression_svr.py "data/features_bahsic_1.dat" "data/labels_1.dat" "predict/hsic_svr_1.dat 42"
python regression_svr.py "data/features_bahsic_2.dat" "data/labels_2.dat" "predict/hsic_svr_2.dat 42"
python regression_svr.py "data/features_bahsic_3.dat" "data/labels_3.dat" "predict/hsic_svr_3.dat 42"
echo "regression bahsic logistic"
python regression_logistic.py "data/features_bahsic_0.dat" "data/labels_0.dat" "predict/hsic_logistic_0.dat 42"
python regression_logistic.py "data/features_bahsic_1.dat" "data/labels_1.dat" "predict/hsic_logistic_1.dat 42"
python regression_logistic.py "data/features_bahsic_2.dat" "data/labels_2.dat" "predict/hsic_logistic_2.dat 42"
python regression_logistic.py "data/features_bahsic_3.dat" "data/labels_3.dat" "predict/hsic_logistic_3.dat 42"
#rrt
echo "regression rrt linear"
python regression_linear.py "data/features_rrt.dat" "data/labels_0.dat" "predict/rrt_linear_0.dat"
python regression_linear.py "data/features_rrt.dat" "data/labels_1.dat" "predict/rrt_linear_1.dat"
python regression_linear.py "data/features_rrt.dat" "data/labels_2.dat" "predict/rrt_linear_2.dat"
python regression_linear.py "data/features_rrt.dat" "data/labels_3.dat" "predict/rrt_linear_3.dat"
echo "regression rrt bayesian"
python regression_bayesian.py "data/features_rrt.dat" "data/labels_0.dat" "predict/rrt_bayesian_0.dat"
python regression_bayesian.py "data/features_rrt.dat" "data/labels_1.dat" "predict/rrt_bayesian_1.dat"
python regression_bayesian.py "data/features_rrt.dat" "data/labels_2.dat" "predict/rrt_bayesian_2.dat"
python regression_bayesian.py "data/features_rrt.dat" "data/labels_3.dat" "predict/rrt_bayesian_3.dat"
echo "regression rrt dtree"
python regression_dtree.py "data/features_rrt.dat" "data/labels_0.dat" "predict/rrt_dtree_0.dat"
python regression_dtree.py "data/features_rrt.dat" "data/labels_1.dat" "predict/rrt_dtree_1.dat"
python regression_dtree.py "data/features_rrt.dat" "data/labels_2.dat" "predict/rrt_dtree_2.dat"
python regression_dtree.py "data/features_rrt.dat" "data/labels_3.dat" "predict/rrt_dtree_3.dat"
echo "regression rrt svr"
python regression_svr.py "data/features_rrt.dat" "data/labels_0.dat" "predict/rrt_svr_0.dat"
python regression_svr.py "data/features_rrt.dat" "data/labels_1.dat" "predict/rrt_svr_1.dat"
python regression_svr.py "data/features_rrt.dat" "data/labels_2.dat" "predict/rrt_svr_2.dat"
python regression_svr.py "data/features_rrt.dat" "data/labels_3.dat" "predict/rrt_svr_3.dat"
echo "regression rrt logistic"
python regression_logistic.py "data/features_rrt.dat" "data/labels_0.dat" "predict/rrt_logistic_0.dat"
python regression_logistic.py "data/features_rrt.dat" "data/labels_1.dat" "predict/rrt_logistic_1.dat"
python regression_logistic.py "data/features_rrt.dat" "data/labels_2.dat" "predict/rrt_logistic_2.dat"
python regression_logistic.py "data/features_rrt.dat" "data/labels_3.dat" "predict/rrt_logistic_3.dat"
#sampled
echo "regression sampled linear"
python regression_linear.py "data/features_sampled.dat" "data/labels_0.dat" "predict/sampled_linear_0.dat"
python regression_linear.py "data/features_sampled.dat" "data/labels_1.dat" "predict/sampled_linear_1.dat"
python regression_linear.py "data/features_sampled.dat" "data/labels_2.dat" "predict/sampled_linear_2.dat"
python regression_linear.py "data/features_sampled.dat" "data/labels_3.dat" "predict/sampled_linear_3.dat"
echo "regression sampled bayesian"
python regression_bayesian.py "data/features_sampled.dat" "data/labels_0.dat" "predict/sampled_bayesian_0.dat"
python regression_bayesian.py "data/features_sampled.dat" "data/labels_1.dat" "predict/sampled_bayesian_1.dat"
python regression_bayesian.py "data/features_sampled.dat" "data/labels_2.dat" "predict/sampled_bayesian_2.dat"
python regression_bayesian.py "data/features_sampled.dat" "data/labels_3.dat" "predict/sampled_bayesian_3.dat"
echo "regression sampled dtree"
python regression_dtree.py "data/features_sampled.dat" "data/labels_0.dat" "predict/sampled_dtree_0.dat"
python regression_dtree.py "data/features_sampled.dat" "data/labels_1.dat" "predict/sampled_dtree_1.dat"
python regression_dtree.py "data/features_sampled.dat" "data/labels_2.dat" "predict/sampled_dtree_2.dat"
python regression_dtree.py "data/features_sampled.dat" "data/labels_3.dat" "predict/sampled_dtree_3.dat"
echo "regression sampled svr"
python regression_svr.py "data/features_sampled.dat" "data/labels_0.dat" "predict/sampled_svr_0.dat"
python regression_svr.py "data/features_sampled.dat" "data/labels_1.dat" "predict/sampled_svr_1.dat"
python regression_svr.py "data/features_sampled.dat" "data/labels_2.dat" "predict/sampled_svr_2.dat"
python regression_svr.py "data/features_sampled.dat" "data/labels_3.dat" "predict/sampled_svr_3.dat"
echo "regression sampled logistic"
python regression_logistic.py "data/features_sampled.dat" "data/labels_0.dat" "predict/sampled_logistic_0.dat"
python regression_logistic.py "data/features_sampled.dat" "data/labels_1.dat" "predict/sampled_logistic_1.dat"
python regression_logistic.py "data/features_sampled.dat" "data/labels_2.dat" "predict/sampled_logistic_2.dat"
python regression_logistic.py "data/features_sampled.dat" "data/labels_3.dat" "predict/sampled_logistic_3.dat"
#generate accuracy files
echo "generating raw files"
echo "Linear" >results.dat
python accuracy.py predict/hsic_linear_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/hsic_linear_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/hsic_linear_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/hsic_linear_3.dat data/labels_test_3.dat 4 >>results.dat
echo "Bayesian" >>results.dat
python accuracy.py predict/hsic_bayesian_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/hsic_bayesian_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/hsic_bayesian_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/hsic_bayesian_3.dat data/labels_test_3.dat 4 >>results.dat
echo "Dtree" >>results.dat
python accuracy.py predict/hsic_dtree_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/hsic_dtree_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/hsic_dtree_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/hsic_dtree_3.dat data/labels_test_3.dat 4 >>results.dat
echo "svr" >>results.dat
python accuracy.py predict/hsic_svr_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/hsic_svr_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/hsic_svr_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/hsic_svr_3.dat data/labels_test_3.dat 4 >>results.dat
echo "logistic" >>results.dat
python accuracy.py predict/hsic_logistic_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/hsic_logistic_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/hsic_logistic_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/hsic_logistic_3.dat data/labels_test_3.dat 4 >>results.dat
echo "Linear" >>results.dat
python accuracy.py predict/sampled_linear_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/sampled_linear_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/sampled_linear_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/sampled_linear_3.dat data/labels_test_3.dat 4 >>results.dat
echo "Bayesian" >>results.dat
python accuracy.py predict/sampled_bayesian_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/sampled_bayesian_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/sampled_bayesian_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/sampled_bayesian_3.dat data/labels_test_3.dat 4 >>results.dat
echo "Dtree" >>results.dat
python accuracy.py predict/sampled_dtree_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/sampled_dtree_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/sampled_dtree_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/sampled_dtree_3.dat data/labels_test_3.dat 4 >>results.dat
echo "svr" >>results.dat
python accuracy.py predict/sampled_svr_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/sampled_svr_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/sampled_svr_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/sampled_svr_3.dat data/labels_test_3.dat 4 >>results.dat
echo "logistic" >>results.dat
python accuracy.py predict/sampled_logistic_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/sampled_logistic_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/sampled_logistic_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/sampled_logistic_3.dat data/labels_test_3.dat 4 >>results.dat
echo "Linear" >>results.dat
python accuracy.py predict/rrt_linear_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/rrt_linear_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/rrt_linear_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/rrt_linear_3.dat data/labels_test_3.dat 4 >>results.dat
echo "Bayesian" >>results.dat
python accuracy.py predict/rrt_bayesian_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/rrt_bayesian_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/rrt_bayesian_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/rrt_bayesian_3.dat data/labels_test_3.dat 4 >>results.dat
echo "Dtree" >>results.dat
python accuracy.py predict/rrt_dtree_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/rrt_dtree_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/rrt_dtree_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/rrt_dtree_3.dat data/labels_test_3.dat 4 >>results.dat
echo "svr" >>results.dat
python accuracy.py predict/rrt_svr_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/rrt_svr_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/rrt_svr_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/rrt_svr_3.dat data/labels_test_3.dat 4 >>results.dat
echo "logistic" >>results.dat
python accuracy.py predict/rrt_logistic_0.dat data/labels_test_0.dat 1 >>results.dat
python accuracy.py predict/rrt_logistic_1.dat data/labels_test_1.dat 2 >>results.dat
python accuracy.py predict/rrt_logistic_2.dat data/labels_test_2.dat 3 >>results.dat
python accuracy.py predict/rrt_logistic_3.dat data/labels_test_3.dat 4 >>results.dat