Skip to content
Permalink
Browse files

Update gd_mf_weights.cc right namespace (#1874)

* Update gd_mf_weights.cc

Use right indices to write out features for the right namespace, correcting bug found in #1871

* Update gd_mf_weights.cc

Add back rank to the right quadratic calculation
  • Loading branch information...
szipkin authored and jackgerrits committed May 14, 2019
1 parent 45a8a7f commit 8e00eba196f3b2a870bd1dea227eb068eb7fd4bd
Showing with 2 additions and 2 deletions.
  1. +2 −2 library/gd_mf_weights.cc
@@ -94,11 +94,11 @@ int main(int argc, char *argv[])
// write out features for right namespace
features& right = ec->feature_space[right_ns];
for (size_t i = 0; i < right.size(); ++i)
{ right_linear << right.space_names[i].get()->second << '\t' << weights[left.indicies[i]];
{ right_linear << right.space_names[i].get()->second << '\t' << weights[right.indicies[i]];

right_quadratic << right.space_names[i].get()->second;
for (size_t k = 1; k <= rank; k++)
right_quadratic << '\t' << weights[(left.indicies[i] + k + rank)];
right_quadratic << '\t' << weights[(right.indicies[i] + k + rank)];
}
right_linear << endl;
right_quadratic << endl;

0 comments on commit 8e00eba

Please sign in to comment.
You can’t perform that action at this time.