CS223 · Chapter 6 · Annotated SlidesApplications to Linear Models
Original
Overview

Applications to Linear Models

Regression as least squares: the design matrix X, parameter vector β and observation vector y, the least-squares line y = β₀ + β₁x, residuals, and fitting other curves.

How to read this page

Every original slide is shown unchanged. Yellow marks on a slide point to a numbered note: hover or tap a mark to jump to its note, and hover a note to see its marks. Questions tagged Past exam appeared on a real paper; Prediction questions are likely angles, not confirmed. Pick an answer to each question: a wrong pick tells you why it is wrong, so you can try again.

All 7 slides
  1. 1 parameter vector observation vector
  2. 2 Slide 2
  3. 3 Slide 3
  4. 4 In some applications, it is necessary to fit data points with something other than
  5. 5 Example:
  6. 6 Slide 6
  7. 7 Slide 7
Slide 1 / 7

parameter vector observation vector

Slide 1: parameter vector observation vector

Notes

  1. Linear model y = Xβ + ε. Least-squares line: X has a column of 1s and a column of x values; solve XᵀXβ = Xᵀy.

Exam angle

PredictionQ1

Set up the design matrix for fitting y = β₀ + β₁x to points (2, 1), (5, 2), (7, 3).

Compare with the model answer

X = [[1, 2], [1, 5], [1, 7]], y = (1, 2, 3); solve XᵀXβ = Xᵀy.

Slide 2 / 7

Slide 2

Slide 2: Slide 2
Slide 3 / 7

Slide 3

Slide 3: Slide 3
Slide 4 / 7

In some applications, it is necessary to fit data points with something other than

Slide 4: In some applications, it is necessary to fit data points with something other than

Notes

  1. Other curves (e.g. y = β₀ + β₁x + β₂x²) are still LINEAR in the parameters: add a column for x².

Slide 5 / 7

Example:

Slide 5: Example:
Slide 6 / 7

Slide 6

Slide 6: Slide 6
Slide 7 / 7

Slide 7

Slide 7: Slide 7