fix fmap
This commit is contained in:
@@ -25,11 +25,11 @@ def loadfmap( fname ):
|
||||
|
||||
def write_nmap( fo, nmap ):
|
||||
for i in xrange( len(nmap) ):
|
||||
fo.write('%d\t%s\n' % (i, nmap[i]) )
|
||||
fo.write('%d\t%s\ti\n' % (i, nmap[i]) )
|
||||
|
||||
# start here
|
||||
fmap, nmap = loadfmap( 'agaricus-lepiota.fmap' )
|
||||
fo = open( 'featname.txt', 'w' )
|
||||
fo = open( 'featmap.txt', 'w' )
|
||||
write_nmap( fo, nmap )
|
||||
fo.close()
|
||||
|
||||
|
||||
@@ -2,5 +2,9 @@
|
||||
python mapfeat.py
|
||||
python mknfold.py agaricus.txt 1
|
||||
../../xgboost mushroom.conf
|
||||
../../xgboost mushroom.conf task=dump model_in=0003.model
|
||||
python maptree.py
|
||||
# this is what dump will looklike without feature map
|
||||
../../xgboost mushroom.conf task=dump model_in=0003.model name_dump=dump.raw.txt
|
||||
# this is what dump will looklike with feature map
|
||||
../../xgboost mushroom.conf task=dump model_in=0003.model fmap=featmap.txt name_dump=dump.nice.txt
|
||||
cat dump.nice.txt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user