ECE 5424 Introduction to Machine Learning Topics Regression

  • Slides: 28
Download presentation
ECE 5424: Introduction to Machine Learning Topics: – Regression Readings: Barber 17. 1, 17.

ECE 5424: Introduction to Machine Learning Topics: – Regression Readings: Barber 17. 1, 17. 2 Stefan Lee Virginia Tech

Administrativia • HW 1 – 39 Submissions – 58 Students Enrolled – 19 MIA

Administrativia • HW 1 – 39 Submissions – 58 Students Enrolled – 19 MIA (? ? ? ) • Project Proposal – Due: 09/21, 11: 55 pm – <= 2 pages, NIPS format (LESS THAN A WEEK!) • HW 2 – – (C) Dhruv Batra Out today Due on Wednesday 09/28, 11: 55 pm Please please start early Implement Linear Regression, Naïve Bayes, Logistic Regression 2

Recap of last time (C) Dhruv Batra 3

Recap of last time (C) Dhruv Batra 3

Learning a Gaussian • Collect a bunch of data – Hopefully, i. i. d.

Learning a Gaussian • Collect a bunch of data – Hopefully, i. i. d. samples – e. g. , exam scores • Learn parameters – Mean – Variance (C) Dhruv Batra 4

MLE for Gaussian • Prob. of i. i. d. samples D={x 1, …, x.

MLE for Gaussian • Prob. of i. i. d. samples D={x 1, …, x. N}: • Log-likelihood of data: (C) Dhruv Batra Slide Credit: Carlos Guestrin 5

Your second learning algorithm: MLE for mean of a Gaussian • What’s MLE for

Your second learning algorithm: MLE for mean of a Gaussian • What’s MLE for mean? (C) Dhruv Batra Slide Credit: Carlos Guestrin 6

Learning Gaussian parameters • MLE: (C) Dhruv Batra 7

Learning Gaussian parameters • MLE: (C) Dhruv Batra 7

Bayesian learning of Gaussian parameters • Conjugate priors – Mean: Gaussian prior – Variance:

Bayesian learning of Gaussian parameters • Conjugate priors – Mean: Gaussian prior – Variance: Inverse Gamma or Wishart Distribution • Prior for mean: (C) Dhruv Batra Slide Credit: Carlos Guestrin 8

MAP for mean of Gaussian (C) Dhruv Batra Slide Credit: Carlos Guestrin 9

MAP for mean of Gaussian (C) Dhruv Batra Slide Credit: Carlos Guestrin 9

New Topic: Regression (C) Dhruv Batra 10

New Topic: Regression (C) Dhruv Batra 10

1 -NN for Regression • Often bumpy (overfits) (C) Dhruv Batra Figure Credit: Andrew

1 -NN for Regression • Often bumpy (overfits) (C) Dhruv Batra Figure Credit: Andrew Moore 11

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 12

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 12

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 13

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 13

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 14

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 14

Linear Regression • Demo – http: //hspm. sph. sc. edu/courses/J 716/demos/Least. Squares/L east. Squares.

Linear Regression • Demo – http: //hspm. sph. sc. edu/courses/J 716/demos/Least. Squares/L east. Squares. Demo. html (C) Dhruv Batra 15

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 16

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 16

Plan for Today • Regression – Linear Regression Recap • Some matrix calculus review

Plan for Today • Regression – Linear Regression Recap • Some matrix calculus review – Connections with Gaussians • The outlier problem – Robust Least Squares (C) Dhruv Batra 17

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 18

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 18

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 19

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 19

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 20

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 20

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 21

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 21

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 22

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 22

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 23

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 23

But, why? • Why sum squared error? ? ? • Gaussians, Watson, Gaussians… (C)

But, why? • Why sum squared error? ? ? • Gaussians, Watson, Gaussians… (C) Dhruv Batra 24

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 25

(C) Dhruv Batra Slide Credit: Greg Shakhnarovich 25

MLE Under Gaussian Model • On board (C) Dhruv Batra 26

MLE Under Gaussian Model • On board (C) Dhruv Batra 26

Is OLS Robust? • Demo – http: //www. calpoly. edu/~srein/Stat. Demo/All. html • Bad

Is OLS Robust? • Demo – http: //www. calpoly. edu/~srein/Stat. Demo/All. html • Bad things happen when the data does not come from your model! • How do we fix this? (C) Dhruv Batra 27

Robust Linear Regression • y ~ Lap(w’x, b) • On board (C) Dhruv Batra

Robust Linear Regression • y ~ Lap(w’x, b) • On board (C) Dhruv Batra 28