The Dummy Variable Trap

Vector Spaces, Span & BasisMedium+20 XP+20

The Dummy Variable Trap

You are building a design matrix for a linear model. The categorical feature city has three levels (A, B, C) and has been one-hot encoded into three columns. Alongside it sit a scaled numeric feature age and the usual bias column of all ones. Six training rows:

biascity_Acity_Bcity_Cage
11002
11004
10101
10103
10015
10010

Read each of the 555 columns as a vector in R6\mathbb{R}^6R6. What is the dimension of the subspace of R6\mathbb{R}^6R6 that these five columns span (the column space of the design matrix)?

Hints

Solve it to unlock the solution

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

Select all that apply.