Number of false negative and number of false positive
by Shilbayeh, Samar Ali (PG)

Hello
I am trying to write a code to find the number of false negative and number of false positive for any number of classes data , for example applying J48 ON iris data set :
J48 tree = new J48();
tree.buildClassifier(data);
Evaluation eval = new Evaluation(data);
eval.crossValidateModel(tree, data, 10, new Random(1));
for(int i=0;i<data.numClasses();i++)
{
System.out.println("the false negative of...."+eval.numFalseNegatives(i));
System.out.println("the false positive of......."+eval.numFalsePositives(i));
}
System.out.println("the confusion matrix "+eval.toMatrixString());
This gives me :
the false negative of....1.0
the false positive of.......0.0
the false negative of....3.0
the false positive of.......3.0
the false negative of....2.0
the false positive of.......3.0
the correclty classified is 96.0
the Incorreclty classified is 4.0
the confusion matrix === Confusion Matrix ===
a b c <-- classified as
49 1 0 | a = Iris-setosa
0 47 3 | b = Iris-versicolor
0 2 48 | c = Iris-virginica
the correct 144.0
the Incorreclty 6.0
Notice that the number of incorrectly classified is 6 , but if you sum up the number of false positives and the number of false negatives for all classes this gives me 12 ???
Samar A.Shilbayeh
PhD student
Data mining and Pattern Recognition Research Centre
School of Computing, Science and Engineering
Newton Building, Salford University, Greater Manchester M5 4WT
Concerns about content should be sent to abuse(a)salford.ac.uk<mailto:abuse@salford.ac.uk>