The following tasks are related to the week 4 tutorial. The individual tasks will ask you to either reflect on parts of the tutorial or modify specific code cells from the tutorial. Specifically, Task 2 and Task 3 require modifications to the code of your copy of the tutorial notebook.
Copy the tutorial notebook in the repository. This makes it easy to go back to the original in case something goes wrong.
This task builds on the $\textbf{Projections}$ section in the tutorial.
##1
. ##1
) to modify the line. Experiment with different values and observe how the projection changes in the plot.##2
.# Write your solution here
This task builds on the $\textbf{Linear Least Squares}$ section in the tutorial.
##3
.X
such that it gradually moves further and further away from the line. Observe how it affects the error $RMS$.X
and observe how they affect the fitted line and the error.X
?X
?# Write your solution here
A 2. order polynomial is given by $$ f(x) = w_0 + w_1x + w_2x^2 = \sum^2_{i=0} w_ix^i. $$
Generally, an $N$'th order polynomial is given by
$$ f(x) = \sum^N_{i=0} w_ix^i, $$where $\mathbb{w}$ is a vector of coefficients.
# Write your solution here
The projection matrix $P = A(A^\top A )^{-1}A^\top$ is, under certain conditions, equal to the identity matrix.
# Write your solution here