Refine balanced_accuracy_score on 2d array