try interact mode

This commit is contained in:
tqchen
2014-03-05 15:28:53 -08:00
parent 2bdcad9630
commit ef5a389ecf
7 changed files with 142 additions and 24 deletions

View File

@@ -95,7 +95,7 @@ namespace xgboost{
if( s.leaf_child_cnt >= 2 && param.need_prune( s.loss_chg, depth - 1 ) ){
this->stat_num_pruned += 2;
// need to be pruned
tree.ChangeToLeaf( pid, param.learning_rate * snode[pid].weight );
tree.ChangeToLeaf( pid, param.learning_rate * s.base_weight );
// tail recursion
this->TryPruneLeaf( pid, depth - 1 );
}