00001 00005 #include <assert.h> 00006 #include "optimize.h" 00007 #include "mgnboost.h" 00008 00009 REGISTER_CREATOR(lemga::MgnBoost); 00010 00011 namespace lemga { 00012 00013 REAL MgnBoost::train () { 00014 assert(!convex && grad_desc_view); 00015 _mgn_gd mgd(this); 00016 iterative_optimize(_line_search<_mgn_gd,BoostWgt,REAL,REAL> 00017 (&mgd, convex? 1.0 : 0.5)); 00018 update_cost_l(); 00019 return cost(); 00020 } 00021 00022 } // namespace lemga