Four Weights, Two Real Directions

Vector Spaces, Span & BasisHard+30 XP+30

Four Weights, Two Real Directions

A linear model predicts with

y^=w1f1+w2f2+w3f3+w4f4\hat{y} = w_1 f_1 + w_2 f_2 + w_3 f_3 + w_4 f_4y^​=w1​f1​+w2​f2​+w3​f3​+w4​f4​

where each fjf_jfj​ is the column of feature jjj's values across the whole dataset — so each fjf_jfj​ is a vector in R3\mathbb{R}^3R3, and y^\hat{y}y^​ is the vector of the model's three predictions.

The dataset has three rows and four features:

Rowf1f_1f1​f2f_2f2​f3f_3f3​f4f_4f4​
1111222444111
2222111555−1-1−1
3111333555222

Training returned the weight vector

w=(234−1)w = \begin{pmatrix} 2 \\ 3 \\ 4 \\ -1 \end{pmatrix}w=​234−1​​

The four feature columns are not independent: they span only a 222-dimensional subspace of R3\mathbb{R}^3R3, and {f1, f2}\{f_1,\ f_2\}{f1​, f2​} is a basis of that subspace. Because of this, the trained weights are not the only ones that produce these predictions — there is a unique pair w1′,w2′w_1', w_2'w1′​,w2′​ with

w1f1+w2f2+w3f3+w4f4  =  w1′f1+w2′f2w_1 f_1 + w_2 f_2 + w_3 f_3 + w_4 f_4 \;=\; w_1' f_1 + w_2' f_2w1​f1​+w2​f2​+w3​f3​+w4​f4​=w1′​f1​+w2′​f2​

holding as an equality of vectors, so the two-feature model reproduces the four-feature model's prediction on every row.

Report the length of that reduced weight vector,

∥(w1′w2′)∥=(w1′)2+(w2′)2\left\lVert \begin{pmatrix} w_1' \\ w_2' \end{pmatrix} \right\rVert = \sqrt{(w_1')^2 + (w_2')^2}​(w1′​w2′​​)​=(w1′​)2+(w2′​)2​

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.