Precision = TP/(TP + FP) recall = TP/(TP + FN) confusion matrix is cm = | TP FP | | FN TN | but in your code: https://github.com/l2ior/metrics/blob/master/func/auxs/cm2f1n.m#L25 and https://github.com/l2ior/metrics/blob/master/func/auxs/cm2f1f.m#L23 you have incorrect code here!
Precision = TP/(TP + FP)
recall = TP/(TP + FN)
confusion matrix is
cm = | TP FP |
| FN TN |
but in your code: https://github.com/l2ior/metrics/blob/master/func/auxs/cm2f1n.m#L25
and https://github.com/l2ior/metrics/blob/master/func/auxs/cm2f1f.m#L23
you have incorrect code here!