Skip to content

Commit

Permalink
fix: update to reflect the fact that coin's learn does not return a p…
Browse files Browse the repository at this point in the history
…rediction (#4621)

* fix: coin's learn does not return a prediction, update to reflect

The prediction it currently returns essentially represents what the prediction would have been post learn and therefore does not match the contract of learn_returns_prediction,

* update test

---------

Co-authored-by: Alexey Taymanov <[email protected]>
  • Loading branch information
jackgerrits and ataymano authored Aug 31, 2023
1 parent 66d5572 commit bea6816
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
22 changes: 11 additions & 11 deletions test/pred-sets/ref/ftrl_coin.predict
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
1
0.361325
0.143347
0.143348
0
0.067602
0.934070
0.160364
0
0.576177
0.576178
1
0.068731
0
Expand Down Expand Up @@ -38,17 +38,17 @@
0
1
1
0.118569
0.118570
0.791537
0
0
0.001875
0
0.179304
0.179305
0.141783
0.575180
0.236666
0.860866
0.860867
1
0
0
Expand Down Expand Up @@ -95,7 +95,7 @@
1
0
0.683733
0.138811
0.138812
0.555727
0.665974
0.212627
Expand Down Expand Up @@ -147,8 +147,8 @@
0.616288
1
0
0.636642
0.694423
0.636643
0.694424
0.643842
0.647201
0.032352
Expand All @@ -163,13 +163,13 @@
0
1
0.250740
0.752841
0.752842
0.756894
0.112263
0.912395
0.563831
0.576449
0.142849
0.142850
0
0.390992
0
Expand All @@ -188,7 +188,7 @@
0.207041
0.094113
0.555100
0.612930
0.612931
0.217877
0.319611
0.119250
Expand Down
14 changes: 7 additions & 7 deletions test/train-sets/ref/ftrl_coin.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Output pred = SCALAR
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.503420 0.006841 2 2.0 0.0000 0.0827 104
0.253545 0.003669 4 4.0 0.0000 0.0000 135
0.250782 0.248019 8 8.0 0.0000 0.0259 146
0.278089 0.305396 16 16.0 1.0000 0.1788 24
0.292183 0.306278 32 32.0 0.0000 0.3479 32
0.263581 0.234979 64 64.0 0.0000 0.0007 61
0.233750 0.203920 128 128.0 1.0000 0.7720 106
0.503420 0.006841 2 2.0 0.0000 0.0000 104
0.253545 0.003669 4 4.0 0.0000 0.0291 135
0.250782 0.248019 8 8.0 0.0000 0.0620 146
0.278089 0.305396 16 16.0 1.0000 0.1084 24
0.292183 0.306278 32 32.0 0.0000 0.1627 32
0.263581 0.234979 64 64.0 0.0000 0.0626 61
0.233750 0.203920 128 128.0 1.0000 0.7347 106

finished run
number of examples = 200
Expand Down
4 changes: 2 additions & 2 deletions vowpalwabbit/core/src/reductions/ftrl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ std::shared_ptr<VW::LEARNER::learner> VW::reductions::ftrl_setup(VW::setup_base_
all.output_config.audit || all.output_config.hash_inv ? learn_coin_betting<true> : learn_coin_betting<false>;
all.weights.stride_shift(3); // NOTE: for more parameter storage
b->ftrl_size = 6;
learn_returns_prediction = true;
learn_returns_prediction = false;
}

b->data.ftrl_alpha = b->ftrl_alpha;
Expand Down Expand Up @@ -498,4 +498,4 @@ std::shared_ptr<VW::LEARNER::learner> VW::reductions::ftrl_setup(VW::setup_base_
.set_print_update(VW::details::print_update_simple_label<ftrl>)
.build();
return l;
}
}

1 comment on commit bea6816

@reportgambling
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You server is already hacked and Misused for promotion of gambling sites. This is url : http://depo25bonus25.vowpalwabbit.org/

Please sign in to comment.