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/gd_mf.cc
parent64eafee7da974529dc527ddb026bc4d76bc47832 (diff)
predict = test_only learn for base learners
Diffstat (limited to 'vowpalwabbit/gd_mf.cc')
-rw-r--r--vowpalwabbit/gd_mf.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/vowpalwabbit/gd_mf.cc b/vowpalwabbit/gd_mf.cc
index 386ac0f1..4edcb8ca 100644
--- a/vowpalwabbit/gd_mf.cc
+++ b/vowpalwabbit/gd_mf.cc
@@ -293,6 +293,10 @@ void end_pass(void* d)
// 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;
}
learner* setup(vw& all)