-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
fix_cbtest_feature_count.patch
319 lines (304 loc) · 15 KB
/
fix_cbtest_feature_count.patch
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
diff --git b/test/train-sets/ref/cb_adf_crash2.stderr a/test/train-sets/ref/cb_adf_crash2.stderr
index 2a6a7c6c..8784d074 100644
--- b/test/train-sets/ref/cb_adf_crash2.stderr
+++ a/test/train-sets/ref/cb_adf_crash2.stderr
@@ -8,11 +8,11 @@ Reading datafile = train-sets/cb_adf_crash_2.data
num sources = 1
average since example example current current current
loss last counter weight label predict features
- n.a. n.a. 1 1.0 unknown 0:1... 2
+ n.a. n.a. 1 1.0 unknown 0:1... 3
finished run
number of examples = 1
weighted example sum = 1.000000
weighted label sum = 0.000000
average loss = n.a.
-total feature number = 4
+total feature number = 3
diff --git b/test/train-sets/ref/cb_adf_dm.stderr a/test/train-sets/ref/cb_adf_dm.stderr
index 5ee390d3..d790ee21 100644
--- b/test/train-sets/ref/cb_adf_dm.stderr
+++ a/test/train-sets/ref/cb_adf_dm.stderr
@@ -8,7 +8,7 @@ Reading datafile = train-sets/cb_test.ldf
num sources = 1
average since example example current current current
loss last counter weight label predict features
-2.000000 2.000000 1 1.0 known 0:0... 12
+2.000000 2.000000 1 1.0 known 0:0... 18
1.000000 0.000000 2 2.0 known 1:-0.0849907... 8
finished run
@@ -16,4 +16,4 @@ number of examples = 3
weighted example sum = 3.000000
weighted label sum = 0.000000
average loss = 1.000000
-total feature number = 31
+total feature number = 34
diff --git b/test/train-sets/ref/cb_adf_dr.stderr a/test/train-sets/ref/cb_adf_dr.stderr
index 13366ba5..265c65e4 100644
--- b/test/train-sets/ref/cb_adf_dr.stderr
+++ a/test/train-sets/ref/cb_adf_dr.stderr
@@ -8,7 +8,7 @@ Reading datafile = train-sets/cb_test.ldf
num sources = 1
average since example example current current current
loss last counter weight label predict features
-2.000000 2.000000 1 1.0 known 0:0... 12
+2.000000 2.000000 1 1.0 known 0:0... 18
0.931417 -0.137166 2 2.0 known 1:0.121728... 8
finished run
@@ -16,4 +16,4 @@ number of examples = 3
weighted example sum = 3.000000
weighted label sum = 0.000000
average loss = 0.931417
-total feature number = 31
+total feature number = 34
diff --git b/test/train-sets/ref/cb_adf_mtr.stderr a/test/train-sets/ref/cb_adf_mtr.stderr
index f0759d88..b7401476 100644
--- b/test/train-sets/ref/cb_adf_mtr.stderr
+++ a/test/train-sets/ref/cb_adf_mtr.stderr
@@ -7,7 +7,7 @@ Reading datafile = train-sets/cb_test.ldf
num sources = 1
average since example example current current current
loss last counter weight label predict features
-2.000000 2.000000 1 1.0 known 0:0... 9
+2.000000 2.000000 1 1.0 known 0:0... 15
1.000000 0.000000 2 2.0 known 1:0... 6
finished run
@@ -15,4 +15,4 @@ number of examples = 3
weighted example sum = 3.000000
weighted label sum = 0.000000
average loss = 1.000000
-total feature number = 23
+total feature number = 27
diff --git b/test/train-sets/ref/cb_adf_rank.stderr a/test/train-sets/ref/cb_adf_rank.stderr
index 1e9968e0..a7d50aac 100644
--- b/test/train-sets/ref/cb_adf_rank.stderr
+++ a/test/train-sets/ref/cb_adf_rank.stderr
@@ -8,7 +8,7 @@ Reading datafile = train-sets/cb_test.ldf
num sources = 1
average since example example current current current
loss last counter weight label predict features
-2.000000 2.000000 1 1.0 known 0:0... 9
+2.000000 2.000000 1 1.0 known 0:0... 15
1.000000 0.000000 2 2.0 known 1:0... 6
finished run
@@ -16,4 +16,4 @@ number of examples = 3
weighted example sum = 3.000000
weighted label sum = 0.000000
average loss = 1.000000
-total feature number = 23
+total feature number = 27
diff --git b/test/train-sets/ref/cb_adf_sm.stderr a/test/train-sets/ref/cb_adf_sm.stderr
index cfd35a18..55dc63a1 100644
--- b/test/train-sets/ref/cb_adf_sm.stderr
+++ a/test/train-sets/ref/cb_adf_sm.stderr
@@ -8,13 +8,13 @@ Reading datafile = train-sets/cb_adf_sm.data
num sources = 1
average since example example current current current
loss last counter weight label predict features
-6.000000 6.000000 1 1.0 known 0:0... 9
-3.000000 0.000000 2 2.0 known 2:-0.532113... 9
-1.500000 0.000000 4 4.0 known 2:-0.165079... 12
+6.000000 6.000000 1 1.0 known 0:0... 12
+3.000000 0.000000 2 2.0 known 2:-0.532113... 12
+1.500000 0.000000 4 4.0 known 2:-0.165079... 16
finished run
number of examples = 4
weighted example sum = 4.000000
weighted label sum = 0.000000
average loss = 1.500000
-total feature number = 47
+total feature number = 52
diff --git b/test/train-sets/ref/cbe_adf_bag.stderr a/test/train-sets/ref/cbe_adf_bag.stderr
index bf60365f..967dd62a 100644
--- b/test/train-sets/ref/cbe_adf_bag.stderr
+++ a/test/train-sets/ref/cbe_adf_bag.stderr
@@ -8,7 +8,7 @@ Reading datafile = train-sets/cb_test.ldf
num sources = 1
average since example example current current current
loss last counter weight label predict features
-0.666667 0.666667 1 1.0 known 0:0.333333... 9
+0.666667 0.666667 1 1.0 known 0:0.333333... 15
0.333333 0.000000 2 2.0 known 0:0.5... 6
finished run
@@ -16,4 +16,4 @@ number of examples = 3
weighted example sum = 3.000000
weighted label sum = 0.000000
average loss = 0.333333
-total feature number = 23
+total feature number = 27
diff --git b/test/train-sets/ref/cbe_adf_cover.stderr a/test/train-sets/ref/cbe_adf_cover.stderr
index 6880a093..3035d093 100644
--- b/test/train-sets/ref/cbe_adf_cover.stderr
+++ a/test/train-sets/ref/cbe_adf_cover.stderr
@@ -9,7 +9,7 @@ Reading datafile = train-sets/cb_test.ldf
num sources = 1
average since example example current current current
loss last counter weight label predict features
-0.666667 0.666667 1 1.0 known 0:0.333333... 9
+0.666667 0.666667 1 1.0 known 0:0.333333... 15
0.333333 0.000000 2 2.0 known 0:0.5... 6
finished run
@@ -17,4 +17,4 @@ number of examples = 3
weighted example sum = 3.000000
weighted label sum = 0.000000
average loss = 0.333333
-total feature number = 23
+total feature number = 27
diff --git b/test/train-sets/ref/cbe_adf_cover_dr.json.stderr a/test/train-sets/ref/cbe_adf_cover_dr.json.stderr
index b351a486..818a5cc4 100644
--- b/test/train-sets/ref/cbe_adf_cover_dr.json.stderr
+++ a/test/train-sets/ref/cbe_adf_cover_dr.json.stderr
@@ -8,7 +8,7 @@ Reading datafile = train-sets/cb_test.json
num sources = 1
average since example example current current current
loss last counter weight label predict features
-0.666667 0.666667 1 1.0 known 0:0.333333... 9
+0.666667 0.666667 1 1.0 known 0:0.333333... 15
0.333333 0.000000 2 2.0 known 0:0.5... 6
finished run
@@ -16,4 +16,4 @@ number of examples = 3
weighted example sum = 3.000000
weighted label sum = 0.000000
average loss = 0.333333
-total feature number = 23
+total feature number = 27
diff --git b/test/train-sets/ref/cbe_adf_cover_dr.stderr a/test/train-sets/ref/cbe_adf_cover_dr.stderr
index 08b1f32a..979eb436 100644
--- b/test/train-sets/ref/cbe_adf_cover_dr.stderr
+++ a/test/train-sets/ref/cbe_adf_cover_dr.stderr
@@ -8,7 +8,7 @@ Reading datafile = train-sets/cb_test.ldf
num sources = 1
average since example example current current current
loss last counter weight label predict features
-0.666667 0.666667 1 1.0 known 0:0.333333... 9
+0.666667 0.666667 1 1.0 known 0:0.333333... 15
0.333333 0.000000 2 2.0 known 0:0.5... 6
finished run
@@ -16,4 +16,4 @@ number of examples = 3
weighted example sum = 3.000000
weighted label sum = 0.000000
average loss = 0.333333
-total feature number = 23
+total feature number = 27
diff --git b/test/train-sets/ref/cbe_adf_cover_dr256.json.stderr a/test/train-sets/ref/cbe_adf_cover_dr256.json.stderr
index a4909f33..78196105 100644
--- b/test/train-sets/ref/cbe_adf_cover_dr256.json.stderr
+++ a/test/train-sets/ref/cbe_adf_cover_dr256.json.stderr
@@ -8,7 +8,7 @@ Reading datafile = train-sets/cb_test256.json
num sources = 1
average since example example current current current
loss last counter weight label predict features
-0.666667 0.666667 1 1.0 known 0:0.333333... 9
+0.666667 0.666667 1 1.0 known 0:0.333333... 15
0.333333 0.000000 2 2.0 known 0:0.5... 6
0.333333 0.333333 4 4.0 known 1:0.591752... 6
0.297761 0.262189 8 8.0 known 1:0.666667... 6
@@ -23,4 +23,4 @@ number of examples = 260
weighted example sum = 260.000000
weighted label sum = 0.000000
average loss = 0.068875
-total feature number = 2210
+total feature number = 2730
diff --git b/test/train-sets/ref/cbe_adf_dsjson.stderr a/test/train-sets/ref/cbe_adf_dsjson.stderr
index abef6034..ee6fca6e 100644
--- b/test/train-sets/ref/cbe_adf_dsjson.stderr
+++ a/test/train-sets/ref/cbe_adf_dsjson.stderr
@@ -9,13 +9,13 @@ Reading datafile = train-sets/decisionservice.json
num sources = 1
average since example example current current current
loss last counter weight label predict features
--0.102041 -0.102041 1 1.0 known 0:0.0833333... 361
--0.051020 0.000000 2 2.0 known 6:0.816667... 361
--0.040816 -0.020408 3 3.0 known 6:0.816667... 361
+-0.102041 -0.102041 1 1.0 known 0:0.0833333... 433
+-0.051020 0.000000 2 2.0 known 6:0.816667... 433
+-0.040816 -0.020408 3 3.0 known 6:0.816667... 433
finished run
number of examples = 3
weighted example sum = 3.000000
weighted label sum = 0.000000
average loss = -0.040816
-total feature number = 1104
+total feature number = 1299
diff --git b/test/train-sets/ref/cbe_adf_epsilon.stderr a/test/train-sets/ref/cbe_adf_epsilon.stderr
index 98e59395..dacf6bfc 100644
--- b/test/train-sets/ref/cbe_adf_epsilon.stderr
+++ a/test/train-sets/ref/cbe_adf_epsilon.stderr
@@ -8,7 +8,7 @@ Reading datafile = train-sets/cb_test.ldf
num sources = 1
average since example example current current current
loss last counter weight label predict features
-0.666667 0.666667 1 1.0 known 0:0.333333... 9
+0.666667 0.666667 1 1.0 known 0:0.333333... 15
0.333333 0.000000 2 2.0 known 1:0.95... 6
finished run
@@ -16,4 +16,4 @@ number of examples = 3
weighted example sum = 3.000000
weighted label sum = 0.000000
average loss = 0.333333
-total feature number = 23
+total feature number = 27
diff --git b/test/train-sets/ref/cbe_adf_first.stderr a/test/train-sets/ref/cbe_adf_first.stderr
index af2100bb..35158afb 100644
--- b/test/train-sets/ref/cbe_adf_first.stderr
+++ a/test/train-sets/ref/cbe_adf_first.stderr
@@ -8,7 +8,7 @@ Reading datafile = train-sets/cb_test.ldf
num sources = 1
average since example example current current current
loss last counter weight label predict features
-0.666667 0.666667 1 1.0 known 0:0.333333... 9
+0.666667 0.666667 1 1.0 known 0:0.333333... 15
0.333333 0.000000 2 2.0 known 1:0.5... 6
finished run
@@ -16,4 +16,4 @@ number of examples = 3
weighted example sum = 3.000000
weighted label sum = 0.000000
average loss = 0.333333
-total feature number = 23
+total feature number = 27
diff --git b/test/train-sets/ref/cbe_adf_softmax.stderr a/test/train-sets/ref/cbe_adf_softmax.stderr
index 543bc037..3ea3464b 100644
--- b/test/train-sets/ref/cbe_adf_softmax.stderr
+++ a/test/train-sets/ref/cbe_adf_softmax.stderr
@@ -8,7 +8,7 @@ Reading datafile = train-sets/cb_test.ldf
num sources = 1
average since example example current current current
loss last counter weight label predict features
-0.666667 0.666667 1 1.0 known 0:0.333333... 9
+0.666667 0.666667 1 1.0 known 0:0.333333... 15
0.333333 0.000000 2 2.0 known 1:0.559575... 6
finished run
@@ -16,4 +16,4 @@ number of examples = 3
weighted example sum = 3.000000
weighted label sum = 0.000000
average loss = 0.333333
-total feature number = 23
+total feature number = 27
diff --git b/test/train-sets/ref/no_shared_features.stderr a/test/train-sets/ref/no_shared_features.stderr
index 23c135ee..83a007ce 100644
--- b/test/train-sets/ref/no_shared_features.stderr
+++ a/test/train-sets/ref/no_shared_features.stderr
@@ -14,4 +14,4 @@ number of examples = 1
weighted example sum = 1.000000
weighted label sum = 0.000000
average loss = 0.000000
-total feature number = 9
+total feature number = 8
diff --git b/test/train-sets/ref/sparse.stderr a/test/train-sets/ref/sparse.stderr
index 5ee390d3..d790ee21 100644
--- b/test/train-sets/ref/sparse.stderr
+++ a/test/train-sets/ref/sparse.stderr
@@ -8,7 +8,7 @@ Reading datafile = train-sets/cb_test.ldf
num sources = 1
average since example example current current current
loss last counter weight label predict features
-2.000000 2.000000 1 1.0 known 0:0... 12
+2.000000 2.000000 1 1.0 known 0:0... 18
1.000000 0.000000 2 2.0 known 1:-0.0849907... 8
finished run
@@ -16,4 +16,4 @@ number of examples = 3
weighted example sum = 3.000000
weighted label sum = 0.000000
average loss = 1.000000
-total feature number = 31
+total feature number = 34