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@gmail.com>2014-01-01 01:26:28 +0400
committerJake Hofman <jhofman@gmail.com>2014-01-01 01:26:28 +0400
commit4bca4ce57e90fbd9af8f50f0fba994244b5ae2e7 (patch)
tree31f22c5c887bd04b76ad4ff2a2705b6563af71ed /vowpalwabbit/sender.cc
parent64eafee7da974529dc527ddb026bc4d76bc47832 (diff)
predict = test_only learn for base learners
Diffstat (limited to 'vowpalwabbit/sender.cc')
-rw-r--r--vowpalwabbit/sender.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/vowpalwabbit/sender.cc b/vowpalwabbit/sender.cc
index dbc0cc38..5ee2e00a 100644
--- a/vowpalwabbit/sender.cc
+++ b/vowpalwabbit/sender.cc
@@ -69,11 +69,6 @@ void receive_result(sender& s)
return_simple_example(*(s.all), NULL, ec);
}
- //placeholder
- void predict(void* d, learner& base, example* ec)
- {
- }
-
void learn(void* d, learner& base, example* ec)
{
sender* s = (sender*)d;
@@ -88,6 +83,15 @@ void receive_result(sender& s)
s->delay_ring[s->sent_index++ % s->all->p->ring_size] = ec;
}
+ //placeholder
+ void predict(void* d, learner& base, example* ec)
+ {
+ bool test_only = ec->test_only;
+ ec->test_only = true;
+ learn(d, base, ec);
+ ec->test_only = test_only;
+ }
+
void finish_example(vw& all, void*, example*ec)
{}