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:
Diffstat (limited to 'vowpalwabbit/active.cc')
-rw-r--r--vowpalwabbit/active.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/vowpalwabbit/active.cc b/vowpalwabbit/active.cc
index 1c6f1c3c..23ccc2b1 100644
--- a/vowpalwabbit/active.cc
+++ b/vowpalwabbit/active.cc
@@ -170,20 +170,18 @@ namespace ACTIVE {
data.active_c0 = vm["mellowness"].as<float>();
//Create new learner
- learner<active>& ret = init_learner(&data, all.l);
+ learner<active>* ret;
if (vm.count("simulation"))
- {
- ret.set_learn(predict_or_learn_simulation<true>);
- ret.set_predict(predict_or_learn_simulation<false>);
- }
+ ret = &init_learner(&data, all.l, predict_or_learn_simulation<true>,
+ predict_or_learn_simulation<false>);
else
{
all.active = true;
- ret.set_learn(predict_or_learn_active<true>);
- ret.set_predict(predict_or_learn_active<false>);
- ret.set_finish_example(return_active_example);
+ ret = &init_learner(&data, all.l, predict_or_learn_active<true>,
+ predict_or_learn_active<false>);
+ ret->set_finish_example(return_active_example);
}
- return make_base(ret);
+ return make_base(*ret);
}
}