Accuracy calculation for NB