diff options
author | John Langford <jl@hunch.net> | 2013-03-20 17:58:26 +0400 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2013-03-20 17:58:26 +0400 |
commit | d47af73d45437d26374ec2eba96496d0cec44bd4 (patch) | |
tree | d70485be1895e0ea4130226b9f25cabc1f97d167 /vowpalwabbit/gd_mf.cc | |
parent | 5d8a15985ecac279e8b08e49cc3e9af5b2af3a68 (diff) |
make learner initialization functional
Diffstat (limited to 'vowpalwabbit/gd_mf.cc')
-rw-r--r-- | vowpalwabbit/gd_mf.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vowpalwabbit/gd_mf.cc b/vowpalwabbit/gd_mf.cc index 6c2166a4..f96fca4c 100644 --- a/vowpalwabbit/gd_mf.cc +++ b/vowpalwabbit/gd_mf.cc @@ -296,10 +296,10 @@ float mf_predict(vw& all, example* ex) } } - void setup(vw& all) + learner setup(vw& all) { sl_t sl = {&all, save_load}; - learner t = {&all,drive,learn,finish,sl}; - all.l = t; + learner l = {&all,drive,learn,finish,sl}; + return l; } } |