Skip to content

Commit e3685a0

Browse files
mruckerjackgerrits
andauthored
fix: This patches a bug with flat_example collision cleanup (#4265)
* Fixed a bug with flat example collision cleanup. Added two unit tests for the old bug. * Fixed a documentation typo. * Update vowpalwabbit/core/tests/flat_example_test.cc Co-authored-by: Jack Gerrits <[email protected]> * Update vowpalwabbit/core/tests/flat_example_test.cc Co-authored-by: Jack Gerrits <[email protected]> * fix test output * finish example * free the flat example * fix tests * Use make_args * test diff * update test Co-authored-by: Jack Gerrits <[email protected]> Co-authored-by: Jack Gerrits <[email protected]>
1 parent 963fa67 commit e3685a0

15 files changed

+877
-831
lines changed

test/train-sets/ref/cmt_test_model.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ Output pred = MULTICLASS
1212
average since example example current current current
1313
loss last counter weight label predict features
1414
1.000000 1.000000 1 1.0 541 197 66
15-
1.000000 1.000000 2 2.0 391 532 29
15+
1.000000 1.000000 2 2.0 391 197 29
1616
1.000000 1.000000 4 4.0 520 68 31
1717
1.000000 1.000000 8 8.0 119 811 33
1818
0.937500 0.875000 16 16.0 835 835 50
1919
0.937500 0.937500 32 32.0 585 899 8
20-
0.937500 0.937500 64 64.0 295 680 27
20+
0.921875 0.906250 64 64.0 295 487 27
2121

2222
finished run
2323
number of examples = 100
2424
weighted example sum = 100.000000
2525
weighted label sum = 0.000000
26-
average loss = 0.950000
26+
average loss = 0.940000
2727
total feature number = 3293

test/train-sets/ref/cmt_train_model.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ average since example example current current cur
1414
loss last counter weight label predict features
1515
1.000000 1.000000 1 1.0 796 0 46
1616
1.000000 1.000000 2 2.0 712 796 23
17-
1.000000 1.000000 4 4.0 590 796 20
18-
1.000000 1.000000 8 8.0 835 676 46
19-
1.000000 1.000000 16 16.0 995 608 40
20-
0.968750 0.937500 32 32.0 200 532 24
17+
1.000000 1.000000 4 4.0 590 676 20
18+
1.000000 1.000000 8 8.0 835 712 46
19+
1.000000 1.000000 16 16.0 995 331 40
20+
0.968750 0.937500 32 32.0 200 898 24
2121
0.984375 1.000000 64 64.0 697 796 41
2222

2323
finished run
2424
number of examples = 100
2525
weighted example sum = 100.000000
2626
weighted label sum = 0.000000
27-
average loss = 0.960000
27+
average loss = 0.970000
2828
total feature number = 3111

test/train-sets/ref/ksvm_model_load.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ Input label = SIMPLE
1212
Output pred = SCALAR
1313
average since example example current current current
1414
loss last counter weight label predict features
15-
0.549445 0.549445 1 1.0 1.0000 0.4506 50
16-
0.558138 0.566831 2 2.0 -1.0000 -0.4332 103
15+
0.551845 0.551845 1 1.0 1.0000 0.4482 50
16+
0.565835 0.579825 2 2.0 -1.0000 -0.4202 103
1717

1818
finished run
1919
number of examples = 2
2020
weighted example sum = 2.000000
2121
weighted label sum = 0.000000
22-
average loss = 0.558138
22+
average loss = 0.565835
2323
best constant = -1.000000
2424
best constant's loss = 1.000000
2525
total feature number = 153
2626
Num support = 4
2727
Number of kernel evaluations = 5 Number of cache queries = 12
28-
Total loss = 1.116275
28+
Total loss = 1.131670

test/train-sets/ref/ksvm_model_save.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ Output pred = SCALAR
1414
average since example example current current current
1515
loss last counter weight label predict features
1616
1.000000 1.000000 1 1.0 1.0000 0.0000 50
17-
1.266108 1.532215 2 2.0 -1.0000 0.5322 103
17+
1.266901 1.533802 2 2.0 -1.0000 0.5338 103
1818

1919
finished run
2020
number of examples = 2
2121
weighted example sum = 2.000000
2222
weighted label sum = 0.000000
23-
average loss = 1.266108
23+
average loss = 1.266901
2424
best constant = -1.000000
2525
best constant's loss = 1.000000
2626
total feature number = 153
2727
Num support = 2
2828
Number of kernel evaluations = 1 Number of cache queries = 4
29-
Total loss = 2.532215
29+
Total loss = 2.533802

test/train-sets/ref/ksvm_train.linear.load.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ Input label = SIMPLE
1313
Output pred = SCALAR
1414
average since example example current current current
1515
loss last counter weight label predict features
16-
0.000000 0.000000 1 1.0 1.0000 1.0701 50
17-
0.075673 0.151346 2 2.0 -1.0000 -0.8487 103
18-
0.037837 0.000000 4 4.0 -1.0000 -1.1355 134
19-
0.093621 0.149404 8 8.0 -1.0000 -1.0347 145
20-
0.076917 0.060214 16 16.0 1.0000 1.0376 23
21-
0.089349 0.101780 32 32.0 -1.0000 -0.9210 31
22-
0.093988 0.098628 64 64.0 -1.0000 -1.0200 60
23-
0.081547 0.069106 128 128.0 1.0000 0.8363 105
16+
0.000000 0.000000 1 1.0 1.0000 1.1186 50
17+
0.028986 0.057973 2 2.0 -1.0000 -0.9420 103
18+
0.014493 0.000000 4 4.0 -1.0000 -1.0943 134
19+
0.068989 0.123484 8 8.0 -1.0000 -1.0258 145
20+
0.055026 0.041063 16 16.0 1.0000 0.9889 23
21+
0.068704 0.082382 32 32.0 -1.0000 -0.9003 31
22+
0.083263 0.097822 64 64.0 -1.0000 -1.0730 60
23+
0.076278 0.069292 128 128.0 1.0000 0.8545 105
2424

2525
finished run
2626
number of examples = 250
2727
weighted example sum = 250.000000
2828
weighted label sum = -22.000000
29-
average loss = 0.070507
29+
average loss = 0.069696
3030
best constant = -1.000000
3131
best constant's loss = 0.912000
3232
total feature number = 19870
33-
Num support = 380
34-
Number of kernel evaluations = 409817 Number of cache queries = 264012
35-
Total loss = 17.626629
33+
Num support = 384
34+
Number of kernel evaluations = 419235 Number of cache queries = 258840
35+
Total loss = 17.424030

0 commit comments

Comments
 (0)