Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cg.cc
diff options
context:
space:
mode:
authorJohn Langford <jl@hunch.net>2011-08-24 08:00:40 +0400
committerJohn Langford <jl@hunch.net>2011-08-24 08:00:40 +0400
commit9984ce30a8dab8fe5e108edfb5eab27c604f05e4 (patch)
tree80d5e03f628638f6181b5b8311b9b96495e634b2 /cg.cc
parenta471da0e21a20f70e4061f445eee4b3691bcee5b (diff)
preconditioner bug fix from Miro
Diffstat (limited to 'cg.cc')
-rw-r--r--cg.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/cg.cc b/cg.cc
index 86521b00..733f75f1 100644
--- a/cg.cc
+++ b/cg.cc
@@ -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];