diff options
author | John Langford <jl@hunch.net> | 2011-08-24 08:00:40 +0400 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2011-08-24 08:00:40 +0400 |
commit | 9984ce30a8dab8fe5e108edfb5eab27c604f05e4 (patch) | |
tree | 80d5e03f628638f6181b5b8311b9b96495e634b2 /cg.cc | |
parent | a471da0e21a20f70e4061f445eee4b3691bcee5b (diff) |
preconditioner bug fix from Miro
Diffstat (limited to 'cg.cc')
-rw-r--r-- | cg.cc | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -39,7 +39,7 @@ void quad_grad_update(weight* weights, feature& page_feature, v_array<feature> & void quad_precond_update(weight* weights, feature& page_feature, v_array<feature> &offer_features, size_t mask, float g) { size_t halfhash = quadratic_constant * page_feature.weight_index; - float update = g * page_feature.x; + float update = g * page_feature.x * page_feature.x; for (feature* ele = offer_features.begin; ele != offer_features.end; ele++) { weight* w=&weights[(halfhash + ele->weight_index) & mask]; |