How to Convert a .csv to .arff using Rapidminer

Not long ago i was working on a machine learning project which required me to convert my dataset into .Arff format. Since my dataset was in .csv format Weka had disabled majority of the algorithms especially the decision tree’s. Though there are many software’s online that convert a .csv file to an .arff, most of them fail while handling a large dataset and are really time consuming. This is when Rapidminer came to my rescue.

Rapidminer is a powerful, code free platform that does file conversions quicker than you thought. Below is a step by step procedure of how to convert a .csv file to .arff file format.

Step 1. Sign up and download Rapidminer for free here.

When you open after download, it might ask you for a license. Click on “Get License” and it connects automatically to your default browser. Select the Starter version or Trial version(valid for 14 days) and below a code paragraph appears which is your license key.

Step 2. Once you open rapidminer, go to the Design tab (Upper rightmost corner). In the Design tab, towards the leftmost corner below the Operators, you can see a window called Repositories. Import your .CSV file here using the Import option. It is a 4 step wizard, make sure you select the “Comma” separator in the second step. Provide a name(Ex: Data0) in the database or sample repository.

Img1

img5

Step 3. Drag and drop the file (Data0) onto the process space and select Operators -> Export -> Data -> Write ARFF. Drag this and drop onto the process space. Connect the Output gate of Read CSV as a input to the Write ARFF (Just drag your mouse, a connection wire will appear immediately. Simple) And the output of Write ARFF to the end of the process space “res”. Here you need browse and enter the Location where your output file in .arff format should be created.

Img3

img6

img7

Img8

Step 4. Conversion DONE! Check the output .arff file on your specified location. (Output need not be created in advance. Rapidminer generated one for you)

Leave a comment