Has anyone done this? Is there any documentation on how to use this parser module? I've looked through the code but it's not clear to me to how to actually use the data after it's been parsed.
The file src\main\java\weka\core\converters\ArffLoader.java (which I assume is where the Arff parsing happens) has these instructions:
- Typical code for batch usage:
- BufferedReader reader = new BufferedReader(new FileReader("/some/where/file.arff"));
- ArffReader arff = new ArffReader(reader);
- Instances data = arff.getData();
- data.setClassIndex(data.numAttributes() - 1);
But what else can I do with 'data'? How do I access each row and the values in each row?
(By the way, I'm new to Java. If I run this code, is there some kind of introspection I could do on data to see what it offers? That's what I would do in Python.)
(I'm also open to suggestions for a simpler open source Arff parser to use in my project if one exists.)