
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

N B
n= (matrix form) Min Cuector form) Least Squares Equations min t & ly - xn B²
hlý-tßl
ß N Similar to ID case, we can take gradient and set to Ollo) y -XB1_) = () (x+x)B -(*) x+y = 0 ( This yields: XFxß Exty XIX Solving for B -If XTX is invertible, we can take a matrix inverse to solve for B B = (x+x)"xty But XIX is not always invertibu
exists if and only if X has linearly x Independent columns What does it mean when X² X is not invertible?
Example 5 data 5 data points with 2 features and a target (x,,X2 24) (1, 2,10),(-3,6,0), (0,0,3),(1,-1,4), (5,-2,20) model: y = a, x, +Q X₂ tb. B=(a, a, b) a, x2 b B (T target X vector y = s feature matrix 2 10 16 O 20 . Using numpy, we get Therefore, our model