validation - Weka - Update Instances during evaluation -
i using weka api test algorithm. during evaluation, want update of instances (feature vectors) after evaluate each instance. here method now
for(int = 0; < testdataset.numinstances(); i++) { // current validation instance instance curinst = testdataset.instance(i); // actual class index int actualclassidx = (int)curinst.classvalue(); // predicted class index int predclassidx = (int)bestclassifier.classifyinstance(curinst); if(actualclassidx == predclassidx) { numcorrect++; } // update validation dataset updatefeatures(testdataset); } double accuracy = (double)numcorrect / testdataset.numinstances(); system.out.println("testing accuracy = " + accuracy * 100 + "%");
this works, however, want use things evaluation object me because need more statistic data (e.g: confusion matrix). there sufficient way achieve that?
Comments
Post a Comment