diff options
author | Paul Mineiro <paul-github@mineiro.com> | 2013-12-21 23:45:13 +0400 |
---|---|---|
committer | Paul Mineiro <paul-github@mineiro.com> | 2013-12-21 23:45:13 +0400 |
commit | 2b371606c6ba48832d78e0143708fcd67f29d439 (patch) | |
tree | 6d338218e5c91b64352c33130473cfb8c50515a3 /vowpalwabbit/lrq.cc | |
parent | 899a5560f5fd6e4e6a42f3df89e1fdae20a4db72 (diff) |
alternating least squares mf
Diffstat (limited to 'vowpalwabbit/lrq.cc')
-rw-r--r-- | vowpalwabbit/lrq.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vowpalwabbit/lrq.cc b/vowpalwabbit/lrq.cc index 01402cd6..2b7bfc4a 100644 --- a/vowpalwabbit/lrq.cc +++ b/vowpalwabbit/lrq.cc @@ -55,8 +55,9 @@ namespace LRQ { size_t which = ec->example_counter; simple_prediction first_prediction; float first_loss; + unsigned int maxiter = (all.training && ! example_is_test (ec)) ? 2 : 1; - for (unsigned int iter = 0; iter < 2; ++iter, ++which) + for (unsigned int iter = 0; iter < maxiter; ++iter, ++which) { // Add left LRQ features, holding right LRQ features fixed // and vice versa |