fix nboosters

This commit is contained in:
tqchen 2014-02-15 19:42:02 -08:00 committed by tqchen
parent c38399b989
commit f204dd7fcf

View File

@ -272,10 +272,11 @@ namespace xgboost{
*/
inline booster::IBooster *GetUpdateBooster( void ){
if( param.do_reboost == 0 || boosters.size() == 0 ){
param.num_boosters += 1;
boosters.push_back( booster::CreateBooster( param.booster_type ) );
booster_info.push_back( 0 );
this->ConfigBooster( boosters.back() );
boosters.back()->InitModel();
boosters.back()->InitModel();
}else{
this->ConfigBooster( boosters.back() );
}