« Return to Thread: SVMLightSaver does not read arff file

SVMLightSaver does not read arff file

by SimonVossen :: Rate this Message:

| View in Thread

I'm using Weka 3.7.5 and try to convert arff to svmlight format via SVMLightSaver:

String[] options = { "-i", ARFF_PATH, "-o", SVMLIGHT_PATH};
SVMLightSaver saver = new SVMLightSaver();
saver.setOptions(options);
saver.writeBatch();

That throws the following exception:

Exception in thread "main" java.io.IOException: No data set loaded. Data set has to be in ARFF format.
        at weka.core.converters.AbstractFileSaver.setOptions(AbstractFileSaver.java:272)
        at weka.core.converters.SVMLightSaver.setOptions(SVMLightSaver.java:172)

But my file is definitely in the correct format, since exactly the same code and file do work for the LibSVMSaver. Can anybody help me on this?

 « Return to Thread: SVMLightSaver does not read arff file