Skip to content

Commit

Permalink
update libsvm file to start with 1 index
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen committed Mar 5, 2016
1 parent 86871d4 commit a894ab6
Show file tree
Hide file tree
Showing 3 changed files with 8,125 additions and 8,127 deletions.
4 changes: 1 addition & 3 deletions demo/binary_classification/mapfeat.py
Expand Up @@ -18,7 +18,7 @@ def loadfmap( fname ):
if it.strip() == '':
continue
k , v = it.split('=')
fmap[ idx ][ v ] = len(nmap)
fmap[ idx ][ v ] = len(nmap) + 1
nmap[ len(nmap) ] = ftype+'='+k
return fmap, nmap

Expand All @@ -45,5 +45,3 @@ def write_nmap( fo, nmap ):
fo.write('\n')

fo.close()


0 comments on commit a894ab6

Please sign in to comment.