Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add baseline test #3070

Merged
merged 1 commit into from
Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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