更新时间:2022-11-29 09:16:40
如概述 此处,setClassIndex 用于定义表示类的属性(用于预测目的).鉴于索引从零开始,data.numAttributes() - 1 表示测试数据集的最后一个属性.
As outlined here, setClassIndex is used to define the attribute that will represent the class (for prediction purposes). Given that the index starts at zero, data.numAttributes() - 1 represents the last attribute of the testdata set.
希望这有帮助!