add linear booster

This commit is contained in:
tqchen
2014-02-08 11:24:35 -08:00
parent d656d9df2c
commit 33acaaa3ae
6 changed files with 306 additions and 7 deletions

View File

@@ -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;
}
}
};
};