【发布时间】:2011-09-07 05:17:54
【问题描述】:
我有一个问题。我有一个从现实世界中对实例进行分类的 java 应用程序,我将它存储在 double[][] 中,我的问题是:
Instance iExample = new Instance(4);
iExample.setValue((Attribute)fvWekaAttributes.elementAt(0), 1.0);
iExample.setValue((Attribute)fvWekaAttributes.elementAt(1), 0.5);
iExample.setValue((Attribute)fvWekaAttributes.elementAt(2), "gray");
iExample.setValue((Attribute)fvWekaAttributes.elementAt(3), "positive");
这是为创建实例而给出的示例,但由于我正在对实例进行分类,它是否需要最后一个元素(3-ClassAtribute),即我想要标记/预测的类?我放什么?一个空字符串?
iExample.setValue((Attribute)fvWekaAttributes.elementAt(3), "");
我希望能够标记实例并获得例如分布。
提前致谢
J.S
【问题讨论】: