3
我有一個問題。我有一個Java應用程序多數民衆贊成分類從現實世界的情況下,我把它存儲在雙[] [],我的問題是這樣的:創建實例進行分類 - Weka
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