Merge pull request #913 from tqchen/master

update libsvm file to start with 1 index
This commit is contained in:
Tianqi Chen 2016-03-05 00:02:47 -08:00
commit 4568692daf
3 changed files with 8125 additions and 8127 deletions

View File

@ -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
@ -45,5 +45,3 @@ for l in open( 'agaricus-lepiota.data' ):
fo.write('\n')
fo.close()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff