-
modify attribute type when converting from csv to arff using ArffSaver()
Hi, all,
Hope someone can help me on this.
I'm converting a csv data file to arff using ArffSaver(). I need to modify an attribute "Type" from numeric type to nominal "{0,1}". Would you please tell me how I can do that?
After
CSVLoader loader = new CSVLoader();
loader.setSource(new File("data_test.csv"));
Instances data = loader.getDataSet();
I suppose I need to use loader.getStructure().attribute(1) to get the attribute "Type", which is the second attribute. But not sure how that works.
Thanks in advance,
Richard
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules