Linear Regression Flashcards
(12 cards)
What is linear regression?
Linear regression assumes a linear functional relationship between the predictor and target variables
What is the formula for linear regression?
y = f(x,w) + ∈
Why can we use linear and non-linear basis functions for linear regression?
Because our model remains linear w.r.t w
What does a learned regression model do?
A learned regression model predicts y for new values of x
What is Ordinary Least Squares (OLS)?
Ordinary Least Squares finds the weights that minimises the sum of squared residuals
What is the formula for OLS?
(also known as squared error)
R(w) = Σ ri^2
= Σ(yi - ŷi(xi,w))^2
= Σ(yi - wTΦ(xi))^2
What is the regression function?
ŷ(xi,w) = Σ wjΦj(xi) = wTΦ(xi)
What do we get when we minimise R(w) w.r.t w to estimate Wols?
Σ yiΦT(xi) = wT(Σ Φ(xi)ΦT(xi))
This can be expressed in matrix-vector form by defining the design matrix Φ
What is the normal equation for solving Wols?
ΦTy = ΦTΦw
Wols - (ΦTΦ)^-1 ΦTy
(also known as computing the pseudoinverse of the design matrix)
What is a consequence of using the inversion in the normal equation?
Numerical inversions of matrices can be computationally expensive if the matrix is large
What is the in-sample error?
Ein(h) = 1/N Σ (h(x(n)) - y(n))^2
What is the hypothesis for linear regression?
h(x) = Σ wixi = wTx