How Wide Is the Street?

Classic MLMedium+20 XP+20

How Wide Is the Street?

A bank trains a linear support vector machine to sort loan applications into approve and deny, using two features: x1x_1x1​, the applicant's yearly income in units of $10,000, and x2x_2x2​, the length of their credit history in years.

The trained model gives every applicant a score

s=w1x1+w2x2+b,w=(0.5, 1.2),b=−4s = w_1 x_1 + w_2 x_2 + b, \qquad w = (0.5,\ 1.2), \qquad b = -4s=w1​x1​+w2​x2​+b,w=(0.5, 1.2),b=−4

The decision boundary is the line s=0s = 0s=0. The two edges of the "street" around it are the lines s=+1s = +1s=+1 on the approve side and s=−1s = -1s=−1 on the deny side, and the support vectors sit exactly on those edges. The weight vector www points straight across the street, at right angles to all three lines. For any vector ddd, the distance ddd covers in the direction of www is d⋅w∥w∥\frac{d \cdot w}{\lVert w \rVert}∥w∥d⋅w​, where ∥w∥=w12+w22\lVert w \rVert = \sqrt{w_1^2 + w_2^2}∥w∥=w12​+w22​​ is the length of www.

Two of the training applicants are support vectors:

applicantx1x_1x1​x2x_2x2​score sss
P5.22.0+1+1+1
Q3.61.0−1-1−1

How wide is the street? That is, what is the distance from the s=−1s = -1s=−1 edge to the s=+1s = +1s=+1 edge, measured at right angles to them? Give your answer rounded to 2 decimal places.

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.