Weka预测为CSV [英] Weka Predictions to CSV

查看:297
本文介绍了Weka预测为CSV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Weka中训练了一个分类器,我可以在测试数据上使用它。此外,我可以选择在日志窗口中显示分类器的此测试数据的预测。

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.

但是,对于我当前的项目,我将能够以CSV格式获取这些数据。这是可能在Weka吗?这是唯一可能的,当使用命令行(我最终会走向)?

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) ?

我可以将整个缓冲结果保存到一个文本文件, case,我必须解析文件,并删除所有的噪音(这不是真的噪音,但你得到的点)。

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).

因此,总结,是否有任何方法可以将测试集的Weka预测输出到CSV文件?

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

编辑:如下面的答案所示,一个选项来做到这一点。但是,它只能在Weka 3.7及以上版本中找到!

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 !

推荐答案

我假设你使用Weka的资源管理器。在 Classify 选项卡中,单击更多选项... ,然后单击 / code>并选择 CSV 。现在点击显示 CSV 的框,并打开一个窗口,您可以在其中填写写入CSV文件的属性。单击 outputFile 并选择一个文件夹并键入一个文件名(注意:您必须提供一个文件名)。运行新测试会将预测结果保存到CSV文件中。

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.

这篇关于Weka预测为CSV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆