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
diff options
context:
space:
mode:
authorJake Hofman <jhofman+github@gmail.com>2011-08-03 23:39:34 +0400
committerJohn <jl@hunch.net>2011-08-04 04:08:12 +0400
commitfc38a0610a06838555059fc68198eb794ebc55c6 (patch)
tree28730d926a80131c6937615d5e2b2e15b6cd649e /sender.cc
parentf7c683ee47ed080521fd0a4c90169debb3df76cd (diff)
persistent daemon should be working ...
Diffstat (limited to 'sender.cc')
-rw-r--r--sender.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/sender.cc b/sender.cc
index 9ed0d040..712bef77 100644
--- a/sender.cc
+++ b/sender.cc
@@ -94,13 +94,18 @@ void parse_send_args(po::variables_map& vm, vector<string> pairs)
void send_features(int i, int j, io_buf *b, example* ec)
{
- output_byte(*b,ec->indices.index());
+ // note: subtracting 1 b/c not sending constant
+ output_byte(*b,ec->indices.index()-1);
- for (size_t* index = ec->indices.begin; index != ec->indices.end; index++)
+ for (size_t* index = ec->indices.begin; index != ec->indices.end; index++) {
+ if (*index == constant_namespace)
+ continue;
+
if (second_of_pair[*index])
output_features(*b, *index, ec->subsets[*index][j*d_1], ec->subsets[*index][(j+1)*d_1]);
else
output_features(*b, *index, ec->subsets[*index][i*d_2], ec->subsets[*index][(i+1)*d_2]);
+ }
b->flush();
}