A new method to compute classification error