return -2;
}
}
private Instances initializeDataSet(int numFeatures, int neededCapacity) {
FastVector fvAllAttributes = new FastVector(numFeatures + 1);
Attribute tempAtt;
for (int i = 0; i < numFeatures; i++) {
tempAtt = new Attribute("att" + i);
fvAllAttributes.addElement(tempAtt);
}
FastVector fvClassVal = new FastVector(2);
fvClassVal.addElement("positive");
fvClassVal.addElement("negative");
Attribute ClassAttribute = new Attribute("theClass", fvClassVal);
fvAllAttributes.addElement(ClassAttribute);
// Create an empty training set
Instances emptySet = new Instances("dataSet", fvAllAttributes, neededCapacity);
emptySet.setClassIndex(numFeatures);