diff --git a/README.md b/README.md index 48eb055d5..bb385b0ed 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,8 @@ Planned key components (TODO): - matrix factorization - structured prediction (3) OpenMP support for parallelization(optional) + +File extension convention: +(1) .h are interface, utils anddata structures, with detailed comment; +(2) .cpp are implementations that will be compiled, with less comment; +(3) .hpp are implementations that will be included by .cpp, with less comment diff --git a/booster/xgboost.h b/booster/xgboost.h index 3646ecc98..6aa6805d2 100644 --- a/booster/xgboost.h +++ b/booster/xgboost.h @@ -8,6 +8,7 @@ #include #include "../utils/xgboost_utils.h" #include "../utils/xgboost_stream.h" +#include "../utils/xgboost_config.h" #include "xgboost_data.h" /*! \brief namespace for xboost package */ @@ -44,8 +45,8 @@ namespace xgboost{ virtual void SaveModel( utils::IStream &fo ) const = 0; /*! * \brief initialize solver before training, called before training - * this function is reserved for solver to allocate necessary space and do other preparations - */ + * this function is reserved for solver to allocate necessary space and do other preparation + */ virtual void InitModel( void ) = 0; public: /*! @@ -96,4 +97,14 @@ namespace xgboost{ }; }; +namespace xgboost{ + namespace booster{ + /*! + * \brief create a gradient booster, given type of booster + * \param booster_type type of gradient booster, can be used to specify implements + * \return the pointer to the gradient booster created + */ + IBooster *create_booster( int booster_type ); + }; +}; #endif