fo da linear regressionjeffp/teaching/foda/lnotes/foda-l11.pdf · sam f squared errors...

7
Fo DA Linear Regression - ( 11 explanatory & dependent variables

Upload: others

Post on 18-Nov-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Fo DA Linear Regressionjeffp/teaching/FoDA/Lnotes/FoDA-L11.pdf · Sam f Squared Errors SSECK.de/--&lriT--EICy..-ee..s5##datp yo n data model E-I plaguedprediction whg?lab# Ty •

Fo DA Linear Regression-( 11 •explanatory & dependent

variables

Page 2: Fo DA Linear Regressionjeffp/teaching/FoDA/Lnotes/FoDA-L11.pdf · Sam f Squared Errors SSECK.de/--&lriT--EICy..-ee..s5##datp yo n data model E-I plaguedprediction whg?lab# Ty •

Data labeled

datsX.

HAITI! rations

XEIR" xd

GEIR"

(X,g) = { ix. is , I

,Huh )

, . . .

,

( x. yn ) )

X - explanatory variable

y -

- dependent variable

slope,

intercept

fit.ie?n--axtb!÷h

Page 3: Fo DA Linear Regressionjeffp/teaching/FoDA/Lnotes/FoDA-L11.pdf · Sam f Squared Errors SSECK.de/--&lriT--EICy..-ee..s5##datp yo n data model E-I plaguedprediction whg?lab# Ty •

• Measure Error based on

Prediction( want to use on data

ftp.nqorasdependentwe don't have yet )

o ⑨-

←& fit l←

fiecxtg.x.is!

Page 4: Fo DA Linear Regressionjeffp/teaching/FoDA/Lnotes/FoDA-L11.pdf · Sam f Squared Errors SSECK.de/--&lriT--EICy..-ee..s5##datp yo n data model E-I plaguedprediction whg?lab# Ty •

How to Measure Error ?-

residual I = llx ) hats !

ithp!:{ ri = yi - gi - g : - llxi )targe

,predicted My

Som of Squared Errors' ab " model

- Mal )

sseax.net#isise*siii?:?T÷÷::÷÷÷÷ri =3 - 4=-1ni

,

Page 5: Fo DA Linear Regressionjeffp/teaching/FoDA/Lnotes/FoDA-L11.pdf · Sam f Squared Errors SSECK.de/--&lriT--EICy..-ee..s5##datp yo n data model E-I plaguedprediction whg?lab# Ty •

Sam f Squared Errors

##datpn

yo

SSECK.de/--&lriT--EICy..-ee..s5data model E- I plaguedprediction

whg?lab#Ty

• Squaring → makes non - negativewhy not cbs -value Iri )

• Norm ( he - norm) llrll !r= Chore.

. . . rn )

commonnotation

value Wi

predicted value Ii

Page 6: Fo DA Linear Regressionjeffp/teaching/FoDA/Lnotes/FoDA-L11.pdf · Sam f Squared Errors SSECK.de/--&lriT--EICy..-ee..s5##datp yo n data model E-I plaguedprediction whg?lab# Ty •

a Start w/ Bayesian InferenceAssume Normal Noise on gi

NUE ),

re )↳ Negative Log - Likelihood

d*↳

sssccx.sl.hn• Easy to Solve

¥.sn?ti:as.:insseeas¥• →

" closed form "

→ gradient descent

pen↳ convex

'

explanatory ra!

Page 7: Fo DA Linear Regressionjeffp/teaching/FoDA/Lnotes/FoDA-L11.pdf · Sam f Squared Errors SSECK.de/--&lriT--EICy..-ee..s5##datp yo n data model E-I plaguedprediction whg?lab# Ty •

t¥Is

a'

.

bit-

- aa? SSEKxstea.is)la

, bC x ) = a xtb

nI

. average I -= In II,

Xi 5 - I ÷,y i

~ Ra . Set "

Center "= ( q. - I

,a . I

,. . .

,xn - I )

-

- (,

- 54 He - 5 ,. . , yn

- 5)

. ¥i*÷¥¥¥¥÷b = g- - a I