【发布时间】:2012-12-04 08:58:43
【问题描述】:
我正在尝试使用 weka 和朴素贝叶斯分类器对一些网络帖子进行分类。
首先我手动分类了许多帖子(大约 100 个否定和 100 个肯定),然后我创建了一个 .arff 文件,格式如下:
@relation classtest
@attribute 'post' string
@attribute 'class' {positive,negative}
@data
'RT @burnreporter: Google has now indexed over 30 trillion URLs. Wow. #LeWeb',positive
'A special one for me Soundcloud at #LeWeb ',positive
'RT @dianaurban: Lost Internet for 1/2 hour at a conference called #LeWeb. Ironic, yes?',negative
.
.
.
然后我打开 Weka Explorer 加载该文件并应用 StringToWordVector 过滤器将帖子拆分为单个单词属性。
然后,在对我的数据集执行相同操作后,选择(在 weka 的分类选项卡中)naive bayes 分类器并选择选择测试集,它返回Train and test set are not compatible。我能做些什么?谢谢!
【问题讨论】:
标签: weka