diff --git a/booster/tree/xgboost_tree_model.h b/booster/tree/xgboost_tree_model.h index b612a9abd..7cdfea981 100644 --- a/booster/tree/xgboost_tree_model.h +++ b/booster/tree/xgboost_tree_model.h @@ -298,10 +298,10 @@ namespace xgboost{ }else{ // right then left, TSplitCond cond = nodes[ nid ].split_cond(); - fprintf( fo, "%d:[f%u>%f] yes=%d,no=%d\n", nid, - nodes[ nid ].split_index(), float(cond), nodes[ nid ].cright(), nodes[ nid ].cleft() ); - this->Dump( nodes[ nid ].cright(), fo, depth+1 ); + fprintf( fo, "%d:[f%u<%f] yes=%d,no=%d\n", nid, + nodes[ nid ].split_index(), float(cond), nodes[ nid ].cleft(), nodes[ nid ].cright() ); this->Dump( nodes[ nid ].cleft(), fo, depth+1 ); + this->Dump( nodes[ nid ].cright(), fo, depth+1 ); } } }; diff --git a/demo/mushroom/maptree.py b/demo/mushroom/maptree.py index b24c0f7fb..b5c046cbb 100755 --- a/demo/mushroom/maptree.py +++ b/demo/mushroom/maptree.py @@ -15,7 +15,7 @@ for l in open( 'dump.txt'): if idx == -1: fo.write(l) else: - fid = int( l[idx+2:len(l)].split('>')[0]) + fid = int( l[idx+2:len(l)].split('<')[0]) rl = l[0:idx]+'['+nmap[fid]+']' + l.split()[1].strip()+'\n' fo.write(rl)