Some time ago I've realized, that scorer node uses a different definition of an Overall Accuracy, than is generally used. Most sources say, that the Overal Accuracy=(TP+TN)/(TP+FP+TN+FN), eventually use an Average Accuracy=((tp/(tp+fp))+(tn/(tn+fn)))/2, while KNIME uses Overall Accuracy=(TP/(TP+FP)), which in fact is a precission (to be more precise: micro-averaged precision). Why is it so?
I didn't spend too much time parsing through it but maybe you can explain based on this example:
Thanks,
Bernd
TP = 1
TN = 1
FP = 2
FN = 1
Overall Accuracy = (TP + TN) / (TP + FP + TN + FN) = 2 / 5 = 0.4 - so it seems ok, but what if there are more than 2 classes?
Hi Torczyk,
for multi class the True false pos neg concept obviously don't work. So we divide the number of correctly classified with the total number of examples.
What is your expected accuracy in your example?
Best, Iris
Dear both:
As you both concluded KNIME's Scorer node computes the overall accuracy. Torczyk, please note the second output port of the node contains much more detailed information that you can also break down to the individual class levels:
- TruePositives
- FalsePositives
- TrueNegatives
- FalseNegatives
- Recall
- Precision
- Sensitivity
- Specifity
- F-measure
- Accuracy (only overall!)
- Cohen's kappa (only overall!)