Skip to content

Commit

Permalink
test: add baseline test (#3070)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgerrits authored Jun 14, 2021
1 parent 6b45001 commit a4f513c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/RunTests
Original file line number Diff line number Diff line change
Expand Up @@ -2437,4 +2437,8 @@ train-sets/ref/slates_simple_w_interactions.stderr
train-sets/ref/cb_dro_explore_adf_sm.stderr
pred-sets/ref/cb_dro_explore_adf_sm.predict
# Test 335: test --baseline
{VW} -d train-sets/0001.dat --baseline
train-sets/ref/baseline_test.stderr
# Do not delete this line or the empty line above it
27 changes: 27 additions & 0 deletions test/train-sets/ref/baseline_test.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Num weight bits = 18
learning rate = 0.5
initial_t = 0
power_t = 0.5
using no cache
Reading datafile = train-sets/0001.dat
num sources = 1
Enabled reductions: gd, baseline, scorer
average since example example current current current
loss last counter weight label predict features
1.000000 1.000000 1 1.0 1.0000 0.0000 51
0.648807 0.297614 2 2.0 0.0000 0.5455 104
0.397826 0.146845 4 4.0 0.0000 0.3158 135
0.295379 0.192932 8 8.0 0.0000 0.2760 146
0.253704 0.212029 16 16.0 1.0000 0.4438 24
0.237305 0.220907 32 32.0 0.0000 0.3310 32
0.231645 0.225984 64 64.0 0.0000 0.1647 61
0.221327 0.211009 128 128.0 1.0000 0.8441 106

finished run
number of examples = 200
weighted example sum = 200.000000
weighted label sum = 91.000000
average loss = 0.190245
best constant = 0.455000
best constant's loss = 0.247975
total feature number = 15482

0 comments on commit a4f513c

Please sign in to comment.