Linear Regression in ML


Review of Linear Model:

  1. are matrices or vectors.
  2. A row or column of a matrix will use a subscript:
    • is a scalar, the ith row and jth column of
    • . is a vector, the ith row of
    • is a vector, the jth column of
  3. Parameters will typically be Greek symbols:
  4. Estimates will be Greek symbols wearing a hat:
  5. is the probability that given , where:
    • X, Y are random variables
  6. represents either a loss function, or the likelihood function
    • represent the log-likelihood function

X(n by p+1), features with columns of list Y(n by 1), target variable B(p+1 by 1) coefficient, parameters Y = XB + E


Training linear model means finding optimal coefficients :

Finding optimal amounts to find vector that minimizes the loss function , which is the sum of squared error:

which is equivalent to:


Finding

by taking the derivative of our loss function and setting it equal to zero


TAGS