« Return to Thread: SVMLightSaver does not read arff file

Re: SVMLightSaver does not read arff file

by Mark Hall-9 :: Rate this Message:

| View in Thread

On 17/07/12 9:29 PM, SimonVossen wrote:

>
> 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?

The error message is a little misleading. Most likely it is the case
that the data you are trying to save is not compatible with the SVM
light format. The saver can't save when the data contains a multi-valued
class attribute and/or missing values.

Cheers,
Mark.


_______________________________________________
Wekalist mailing list
Send posts to: Wekalist@...
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

 « Return to Thread: SVMLightSaver does not read arff file