I have a (.xls) data file and I want to use it in Weka. I try to convert it with Weka converter as described in Weka tutorial, but after saving as .csv type I don't know how to tag the attribute or data. Is there any other way to convert .xls format to arff?
2 Answers
2
votes
You must work wtih csv files, they can be directly converted in command line:
java -cp "path/to/weka.jar" weka.core.converters.CSVLoader file.csv > file.arff
Please make sure that there are no quotation mark " for numeric data. If you use non standard characters, use UTF-8 and add -Dfile.encoding=utf-8 when you start weka. Any nominal or string data will be automatically converted
If you still have problems, please provide part of your csv file.
What do you mean by "how tag the attribute or data." ?
1
votes
The following steps can solve your problem
- Save your .xls file in .csv format.
- Open the Weka GUI Chooser and then click on the tools button in the top menu bar.
- Click on the Arffviwer
- Choose file types to be loaded like, *.csv, *.data
- Open *.csv file to view the data and values
- Name the file with the .arff extension
- Save the file