From 10c31ab2cbbed1f44d535ce2de14e2a41b8261e1 Mon Sep 17 00:00:00 2001 From: Philip Hyunsu Cho Date: Thu, 30 Aug 2018 13:18:42 -0700 Subject: [PATCH] Fix #3638: Binary classification demo should produce LIBSVM with 0-based indexing (#3652) --- demo/binary_classification/mapfeat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/binary_classification/mapfeat.py b/demo/binary_classification/mapfeat.py index 519891bddc30..4cb98f652cba 100755 --- a/demo/binary_classification/mapfeat.py +++ b/demo/binary_classification/mapfeat.py @@ -18,7 +18,7 @@ def loadfmap( fname ): if it.strip() == '': continue k , v = it.split('=') - fmap[ idx ][ v ] = len(nmap) + 1 + fmap[ idx ][ v ] = len(nmap) nmap[ len(nmap) ] = ftype+'='+k return fmap, nmap