Maybe you are looking for zero_one_loss.