378 views
1 1 vote
Let a set of data points with five samples and two features per sample be $X=\left[\begin{array}{cc}1 & 2 \\ 2 & 3 \\ 4 & 2.5 \\ 6 & 4 \\ 7.5 & 5\end{array}\right]$ and the corresponding labels be $y=\left[\begin{array}{c}1.5 \\ 2 \\ 2.5 \\ 3 \\ 4\end{array}\right]$. Perform linear regression on this data set and choose the optimal solution for $w^*$ to minimize the sum of squares error.

A. $\left[\begin{array}{l}0.2763 \\ 1.2039\end{array}\right]$

B. $\left[\begin{array}{l}0.0691 \\ 0.3010\end{array}\right]$

C. $\left[\begin{array}{l}0.1382 \\ 0.6019\end{array}\right]$

D. $\left[\begin{array}{l}0.0276 \\ 0.1204\end{array}\right]$

1 Answer

2 2 votes
$$
\begin{aligned}
&\text { optimal } w^*=\left(X^T X\right)^{-1}\left(X^T y\right)\\
&\begin{aligned}
& X^T X=\left[\begin{array}{cc}
113.25 & 79.5 \\
79.5 & 60.25
\end{array}\right] \\
& X^T y=\left[\begin{array}{c}
63.5 \\
47.25
\end{array}\right] \\
& w^*=\left[\begin{array}{l}
0.1382 \\
0.6019
\end{array}\right]
\end{aligned}
\end{aligned}
$$
• reshown by
Position:
Show:

Related questions

1 1 vote
1 1 answer
418
418 views
GO Classes asked Sep 17, 2025
418 views
Consider a set of $3$ paired observations on $\left(x_i, b_i\right), i=1,2,3$ as $((1,6),(-1,3),(3,15))$. For the closest line $b$ to go through these points, which of th...
1 1 vote
1 1 answer
321
321 views
GO Classes asked Sep 17, 2025
321 views
Suppose we have the following three training points: $x 1=(1,1), x 2=(-1,3), x 3=(2,4)$ and the associated outputs with these 3 points are: $(y 1, y 2, y 3)=(5,11,18)$.if...
3 3 votes
2 2 answers
353
353 views
GO Classes asked Sep 17, 2025
353 views
In a binary classification problem with balanced classes (exactly the same number of positive examples as negative examples), a machine learning model has an accuracy of ...
0 0 votes
1 1 answer
341
341 views
GO Classes asked Sep 29, 2025
341 views
Assume that for a certain linear regression problem involving $4$ features, the following weight vectors produce an equal amount of mean square error:$$\begin{aligned}& w...