Looks like the value error is haunting me still. I am trying to load a multi-label libSVM format data file (sample pasted below) as:
X_train, y_train = load_svmlight_file("testtrain.txt", dtype=np.int32, multilabel=True) which gives me at-least 2 issues which confuse me. Help me here. [1]. ValueError: empty string for float() I did specify "np.int32". [Note that numpy is imported as 'np']. Yet, it seemed to expect float for feature values. The error comes even if I remove the dtype altogether. [2]. ValueError: Feature indices in SVMlight/LibSVM data file should be sorted and unique. Is there a limitation as such? Because my dataset is from LSHTC (http://lshtc.iit.demokritos.gr/LSHTC4_GUIDELINES) and the website specifically mentions it to be in libSVM format. Sample data below. I can see that the features are not sorted. 314523, 165538, 76255, 335416, 416827 1250536:1 1744638:1 298526:1 1568238:1 77076:1 1327541:1 1416569:1 1586020:1 1700948:1 652007:1 1815811:1 488832:2 572742:1 1137332:2 1473311:1 513820:1 1210088:1 423304:1 1357328:1 1673413:1 214525:1 1733491:1 1313723:1 1540893:5 1465710:1 2021871:1 1936077:1 513790:1 660115:1 1287792:3 481092:1 843169:2 572336:1 460447:1 97802:1 1397861:3 1284496:1 1875794:1 1972806:1 1457483:1 227881:3 410359:1 265208:7 985823:1 331158:1 85847:1 1402995:1 1710579:1 102853:1 1274838:1 1105861:2 892257:1 951474:1 1004657:1 234275:1 830416:1 563647:3 1564710:4 1156150:1 970168:2 592526:3 550210:1 453755:1 705700:1 1470603:1 903090:1 614785:2 1151929:1 1303404:1 2070888:1 1837036:1 1360760:1 1611236:1 955673:1 49164:2 704224:2 1137133:1 1298082:1 977746:1 9364:1 1267431:1 Specs ===== python 2.6.6 scipy - 0.13.3 numpy - 1.8.0 scikit-learn - 0.14.1 - Anitha ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general