Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert CSV to ARFF using weka

Tags:

I've been trying to get this dataset http://archive.ics.uci.edu/ml/datasets/Communities+and+Crime+Unnormalized into Weka and no luck at all. I converted it to CSV and then loaded it into Weka and then tried to convert it to ARFF but still giving me the error "attribute names are not unique".

Also, do I have to spread the training dataset from testing dataset or keep them together?

like image 375
LumberJack Avatar asked Apr 26 '12 21:04

LumberJack


People also ask

Can we use CSV file in WEKA?

Use csv files - Weka Wiki. Yes, you can.

How do I make an ARFF file?

One simple way to do this is in version 3.6. 11 (I'm on a mac) is to open up the Explorer and then in the Preprocess tab select "Open file...", just as you would when you want to open a . arff file. Then where it asks for the File Format at the bottom of the dialog box, change it to .


1 Answers

You can also use the ArffViewer (Tools -> ArffViewer or Ctrl+A). Then open your CSV file.

Next go to File -> Save as... and select Arff data files (should be selected by default).

Note that your fields must be separated with a comma and not a semicolon.

like image 86
EsTeGe Avatar answered Nov 09 '22 14:11

EsTeGe