Two Features, One Matrix Inverse

Linear Algebra for MLMedium+20 XP+20

Two Features, One Matrix Inverse

A courier dispatcher models delivery time from two features:

  • x1x_1x1​ — number of items in the order
  • x2x_2x2​ — distance to the address, in km

The model carries no bias term:

y^=w1x1+w2x2\hat{y} = w_1 x_1 + w_2 x_2y^​=w1​x1​+w2​x2​

Four completed deliveries make up the training set:

DeliveryItems x1x_1x1​Distance x2x_2x2​ (km)Time yyy (min)
1111222777
2222111555
3333444121212
4444333161616

The design matrix XXX is 4×24 \times 24×2 — its two columns are x1x_1x1​ and x2x_2x2​ — and the least-squares weights are the solution of the normal equations

X⊤X w^=X⊤yX^\top X\, \hat{w} = X^\top yX⊤Xw^=X⊤y

A new order comes in: 666 items, 555 km away.

What delivery time does the fitted 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.

minutes