Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weka Predictions to CSV

I've trained a classifier in Weka, and I'm able to use it on test data. Additionally, I can opt to display the classifier's predictions in the log window for this test data.

However, for my current project, it would be convenient for me to be able to get this data in CSV format. Is this possible in Weka ? Is it only possible when using the command line (something I'll eventually move towards) ?

I could always save the entire buffer result to a text file, but in that case, I would have to parse the file and remove all the "noise" (which isn't really noise, but you get the point).

So, to conclude, is there any way to output Weka's predictions for a test set to a CSV file ?

Edit: as the answer below shows, there is an option to do this. However, it can only be found in Weka 3.7 and above !

like image 798
elliottbolzan Avatar asked Oct 29 '12 21:10

elliottbolzan


1 Answers

I assume you use Weka's Explorer. In the Classify tab click on More options..., then click on Output predictions and select CSV. Now click on the box showing CSV and a window opens where you can fill in the properties of writing to a CSV file. Click on outputFile and select a folder and type a filename (note: you must supply a filename). Running a new test will now save the prediction results to your CSV file.

like image 146
Sicco Avatar answered Nov 03 '22 16:11

Sicco