update libsvm file to start with 1 index

This commit is contained in:
tqchen 2016-03-05 00:01:42 -08:00
parent 86871d4be9
commit a894ab6898
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