I am calculating FP,FN,TP,TN and accuracy for each fold of k-fold cross validation (k=5). For this, i am making a confusion matrix in each fold of 5 fold, and for each confusion matrix i am able to calculate FP,FN,TP, TN and accuracy. I am also calculating accuracy return by each fold of k-fold CV like (mean_accuracy +/- %). In this way i have total five confusion matrix for five fold cross validation, finally i am calculating average of all parameter results as a final. I have doubt that after each fold of k-fold CV i am getting accuracy 93-95%, however for the same fold i am getting accuracy calculated by confusion matrix 99-99.90%. Why there is a gap in accuracy? which accuracy i should consider? Also i am getting precision value infinity when TP+FP = 0, in that case, i am considering Precision=1, is it correct? What should be correct value of Precision and Sensitivity, if denominator is zero?

Parameters used:

Sensitivity = TP/TP+FN

Precision = TP/TP+FP

Specificity = TN/TN+FP

F-Score = 2TP/2TP+FP+TN

Accuracy = TP+TN/TP+FP+FN+TN

Similar questions and discussions