This commit is contained in:
tqchen
2014-03-03 11:05:10 -08:00
parent 074a861e7b
commit 623e003923
11 changed files with 172 additions and 34 deletions

View File

@@ -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()

View File

@@ -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