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
+1 -3
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()
+1611 -1611
View File
File diff suppressed because it is too large Load Diff
+6513 -6513
View File
File diff suppressed because it is too large Load Diff