Three Drivers for Every Van

Linear Algebra for MLHard+30 XP+30

Three Drivers for Every Van

A logistics company predicts how much freight a depot moves per day from two features:

  • x1x_1x1​ — number of delivery vans
  • x2x_2x2​ — number of drivers on the payroll

Five depots make up the training set:

DepotVans x1x_1x1​Drivers x2x_2x2​Freight yyy (tonnes/day)
A111333777
B222666111111
C333999161616
D444121212222222
E555151515272727

The model has no bias term: y^=w1x1+w2x2\hat{y} = w_1x_1 + w_2x_2y^​=w1​x1​+w2​x2​, and XXX is the 5×25 \times 25×2 design matrix whose columns are x1x_1x1​ and x2x_2x2​.

The team tries the normal equations X⊤X w=X⊤yX^\top X\,w = X^\top yX⊤Xw=X⊤y, finds they cannot be solved, and switches to ridge regression: choose www to minimise

∥y−Xw∥2+λ∥w∥2,λ=50\lVert y - Xw \rVert^2 + \lambda \lVert w \rVert^2, \qquad \lambda = 50∥y−Xw∥2+λ∥w∥2,λ=50

whose closed-form solution is

w^=(X⊤X+λI)−1X⊤y\hat{w} = (X^\top X + \lambda I)^{-1}X^\top yw^=(X⊤X+λI)−1X⊤y

A new depot has just opened, running 666 vans with 202020 drivers.

How much freight does the ridge model predict for it?

Round your answer to two decimal places.

Hints

Solve it to unlock the solution

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

tonnes