Least square problem using Cholesky Decomposition implemented by Python
For a least square problem, we need to create an affine function, to fit data points
We know that our form for the linear regression is in the form:
But observe that the
where of the appropriate size, and
we can stack these 2 above together as:
Then it is much easier to see that our goal is to get:
which is just to find the projection of the sample point
Recall from what we learned in the lecture that we can use many decompositions for a symmetric matrix