我有一个数据集,对于数据集,并非每个分类器都可用?如何更改我的数据集以获取,例如,J48适用于我的数据集?
感谢。
@relation test
@attribute SQ numeric
@attribute DH numeric
@attribute EEG1 numeric
@attribute EEG2 numeric
@attribute ECG numeric
@attribute EM numeric
@attribute FATIGUE numeric
@data
0.9,0.06,0.4,0.3,0.12,0.19,0.1
0.9,0.17,0.4,0.5,0.42,0.19,0.18
0.5,0.5,0.5,0.5,0.5,0.7,0.5
0.5,0.5,0.45,0.45,0.42,0.56,0.39
0.01,1,1,0.99,1,1,1
0.7,0.17,0.3,0.4,0.28,0.69,0.24
0.8,0.28,0.5,0.4,0.44,0.19,0.24
0.88,0.17,0.45,0.4,0.42,0.7,0.26
0.1,0.83,0.9,0.89,1,0.75,0.884
0.15,0.96,0.75,0.8,0.92,0.75,0.884
0.23,0.83,0.75,0.78,0.75,0.74,0.83
0.19,0.86,0.7,0.75,0.73,0.89,0.83
0.1,0.63,0.7,0.7,0.71,0.74,0.756
0.34,0.68,0.8,0.75,0.72,0.73,0.756
0.08,0.92,0.98,0.98,0.82,1,0.926
0.1,0.93,0.93,0.95,1,1,0.926
0.065,0.92,0.95,0.95,0.75,1,0.926
答案 0 :(得分:6)
J48
是决策树分类器,无法预测数字属性。您的数据集中只有数字属性,因此您无法使用J48
。如果您有分类属性,则可以使用更多分类器。
答案 1 :(得分:4)
问题是,对于class属性,您有数字输入, 但 j48需要名义输入。
因此,在weka中,在预处理标签中选择 filters-> unsupervised-> attribute-> NumericToNominal
你完成了!
答案 2 :(得分:0)
在Weka 3.7.2及更高版本中,Weka引入了一个"包管理器" (就像一个市场)并将一堆东西搬到可单独安装的包装中#34;这样做是为了更容易为Weka做贡献(并打开Weka直到使用第三方库),并减轻了Weka团队的维护负担。您可以在GUIChooser - >工具中找到包管理器。
打开包管理器窗口后,您可以看到可用包的列表,选择要添加到分类器中的包。然后单击顶部的安装按钮,它将被下载。
如果您收到与java相关的任何错误,请单击“刷新存储库缓存”。并再次选择包并安装它。这次,它不会显示任何错误。
还可以通过以下网址浏览包: http://weka.sourceforge.net/packageMetaData/