Weka Predictions to CSV

风格不统一 提交于 2019-12-18 05:48:06

问题


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 !


回答1:


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.




回答2:


In Weka 3.6.x you can right-click your model, choose "Visualize classifier errors" and Save the data (including the prediction) from there.




回答3:


If you use weka knowledge flow to build models (Easier than explorer), there are CSV data sinks you can use to save as CSV file.



来源:https://stackoverflow.com/questions/13130005/weka-predictions-to-csv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!