199 views
0 0 votes

The closed form solution for linear regression is $\theta=\left(\mathbf{X}^T \mathbf{X}\right)^{-1} \mathbf{X}^T \mathbf{y}$. Suppose you have $N=35$ training examples and $M=5$ features (excluding the bias term). Once the bias term is now included, what are the dimensions of $\mathbf{X}, \mathbf{y}, \theta$ in the closed form equation?

 

  1. $\mathbf{X}$ is $35 \times 6, \mathbf{y}$ is $35 \times 1, \theta$ is $6 \times 1$
  2. $\mathbf{X}$ is $35 \times 6, \mathbf{y}$ is $35 \times 6, \theta$ is $6 \times 1$
  3. $\mathbf{X}$ is $35 \times 5, \mathbf{y}$ is $35 \times 1, \theta$ is $5 \times 1$
  4. $\mathbf{X}$ is $35 \times 5, \mathbf{y}$ is $35 \times 5, \theta$ is $5 \times 5$

1 Answer

0 0 votes

In the closed-form solution θ=(X⊤X)−1X⊤y, we include a bias term, so total features become 6. Hence, X is 15×6, y is 15×1, and θ is 6×1. Correct option is A.

Answer:
Position:
Show:

Related questions

1 1 vote
1 1 answer
504
504 views
GO Classes asked Mar 18, 2025
504 views
Consider linear regression and logistic regression. They both use linear functions.They both can be used to solve regression prob-They both use the logistic activation fu...
1 1 vote
1 1 answer
247
247 views
GO Classes asked Mar 13, 2025
247 views
Consider a simple classification task with features $x_i \in \mathbb{R}^d$ and $k$ classes. Suppose we train a linear classifier to minimize the regularized least squared...
1 1 vote
1 1 answer
247
247 views
GO Classes asked Mar 13, 2025
247 views
Consider just the general shape of the following plots.For each of the following possible interpretations of the quantities being plotted on the $X$ and $Y$ axes, indicat...
1 1 vote
0 0 answers
185
185 views
GO Classes asked Mar 13, 2025
185 views
Consider the following training data: xy132130.5Suppose the data comes from a model $y=c x^\beta$ , for unknown constants $c$ and $\beta$. Use least squares linear regres...