fix mushroom
This commit is contained in:
parent
c4949c0937
commit
6fa5c30777
@ -298,10 +298,10 @@ namespace xgboost{
|
|||||||
}else{
|
}else{
|
||||||
// right then left,
|
// right then left,
|
||||||
TSplitCond cond = nodes[ nid ].split_cond();
|
TSplitCond cond = nodes[ nid ].split_cond();
|
||||||
fprintf( fo, "%d:[f%u>%f] yes=%d,no=%d\n", nid,
|
fprintf( fo, "%d:[f%u<%f] yes=%d,no=%d\n", nid,
|
||||||
nodes[ nid ].split_index(), float(cond), nodes[ nid ].cright(), nodes[ nid ].cleft() );
|
nodes[ nid ].split_index(), float(cond), nodes[ nid ].cleft(), nodes[ nid ].cright() );
|
||||||
this->Dump( nodes[ nid ].cright(), fo, depth+1 );
|
|
||||||
this->Dump( nodes[ nid ].cleft(), fo, depth+1 );
|
this->Dump( nodes[ nid ].cleft(), fo, depth+1 );
|
||||||
|
this->Dump( nodes[ nid ].cright(), fo, depth+1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -15,7 +15,7 @@ for l in open( 'dump.txt'):
|
|||||||
if idx == -1:
|
if idx == -1:
|
||||||
fo.write(l)
|
fo.write(l)
|
||||||
else:
|
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'
|
rl = l[0:idx]+'['+nmap[fid]+']' + l.split()[1].strip()+'\n'
|
||||||
fo.write(rl)
|
fo.write(rl)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user