add linear booster
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "xgboost_gbmbase.h"
|
||||
// implementations of boosters
|
||||
#include "tree/xgboost_svdf_tree.hpp"
|
||||
#include "linear/xgboost_linear.hpp"
|
||||
|
||||
namespace xgboost{
|
||||
namespace booster{
|
||||
@@ -21,7 +22,11 @@ namespace xgboost{
|
||||
* \return the pointer to the gradient booster created
|
||||
*/
|
||||
IBooster *CreateBooster( int booster_type ){
|
||||
return new RTreeTrainer();
|
||||
switch( booster_type ){
|
||||
case 0: return new RTreeTrainer();
|
||||
case 1: return new LinearBooster();
|
||||
default: utils::Error("unknown booster_type"); return NULL;
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user