Consider the following training set D = {(x1, y1) = (0, 0), (x2, y2) = (1, 7), (x3, y3) = (2, 3)}. Compute the following by hand:
a. Ordinary Least Square: $(w_{OLS}, b_{OLS}) = \text{argmin}_{w,b} \sum_{i=1}^{3} (y_i - wx_i - b)^2$
b. weighted linear Regression: $(w_{WLS}, b_{WLS}) = \text{argmin}_{w,b} \sum_{i=1}^{3} a_i(y_i - wx_i - b)^2$ where $a = [2, 1, 2]$
c. Polynomial Least Square(Calculator allowed): $(w_{PLS}, b_{PLS}) = \text{argmin}_{w,b} \sum_{i=1}^{3} (y_i - w^T z_i - b)^2$ where $z_i = ((x_i)^2, (x_i)^3)$ and
$w = (w_2, w_3)^T$.
Hint: if $A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$ then $A^{-1} = \frac{1}{det(A)} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix}$