Correct the way to calculate the optimal decision boundary