Case 2 – determining the optimal hyperplane