add tree refresher, need review

This commit is contained in:
tqchen 2014-08-18 21:32:31 -07:00
parent dbf3a21942
commit f757520c02
2 changed files with 2 additions and 2 deletions

View File

@ -512,8 +512,6 @@ class RegTree: public TreeModel<bst_float, RTreeNodeStat>{
int pid = this->GetLeafIndex(feat, root_id);
return (*this)[pid].leaf_value();
}
private:
/*! \brief get next position of the tree given current pid */
inline int GetNext(int pid, float fvalue, bool is_unknown) const {
float split_value = (*this)[pid].split_cond();

View File

@ -48,6 +48,7 @@ class IUpdater {
} // namespace xgboost
#include "./updater_prune-inl.hpp"
#include "./updater_refresh-inl.hpp"
#include "./updater_colmaker-inl.hpp"
namespace xgboost {
@ -60,6 +61,7 @@ namespace tree {
template<typename FMatrix>
inline IUpdater<FMatrix>* CreateUpdater(const char *name) {
if (!strcmp(name, "prune")) return new TreePruner<FMatrix>();
if (!strcmp(name, "refresh")) return new TreeRefresher<FMatrix>();
if (!strcmp(name, "grow_colmaker")) return new ColMaker<FMatrix, GradStats>();
utils::Error("unknown updater:%s", name);
return NULL;